|
-
Jun 24th, 2002, 09:04 PM
#1
Thread Starter
Fanatic Member
frameset refreshing
i have a login script running one of two frames on a page, wehn frame_2 runs the script (a certain page), how can i have it refresh the other frame automatically ?
-
Jun 25th, 2002, 07:20 AM
#2
Addicted Member
I did something like this with an IFRAME before, should react the same way.
in the nav frame I called a function in the body frame. The body frame was given the name pricelist.. so from the nav frame it looked like this
function exePricelist()
{
pricelist.document.runChecker();
}
and in the runChecker function on the pricelist frame it said something like this.
function runChecker()
{
window.location.href = 'whatever.html';
}
hope that helps
-
Jun 25th, 2002, 07:43 AM
#3
Thread Starter
Fanatic Member
ok, i tried that, and it didnt seem to work for me. this is how i used it:
PHP Code:
IF ($action == "do_login")
{
setcookie("gdb_user", $upass, time()+3600);
$message = "login will be active for approximately 1 hour";
ECHO '<script language="javascript">function exePricelist() {side_menu.document.runChecker();}</script>';
}
-
Jun 25th, 2002, 09:02 AM
#4
Addicted Member
damn thats tough. I thought it would work. I'm not getting it over here. I noticed what I have done differently, instead of calling the function I call a form to submit..
pricelist.theform.submit();
and that seemed to work fine... and I passed info between the frames...
MAIN FRAME GRABBING FROM NAV FRAME
var discAmnt = window.parent.document.theform.discAmnt.value;
Hmm... maybe its easier for you to just see my code...
http://www.visualwow.com/pages/prici...4&startimage=0
That page has the iframe and the info passed back and form and the submit button which calls a php page.
-
Jun 25th, 2002, 09:58 AM
#5
Thread Starter
Fanatic Member
thanx, i'll have to have a look at that tomorrow (its 1:00, so i have to go to sceep)
-
Jun 25th, 2002, 01:21 PM
#6
PHP Code:
IF ($action == "do_login")
{
setcookie("gdb_user", $upass, time()+3600);
$message = "login will be active for approximately 1 hour";
ECHO '<script language="javascript">function exePricelist() {side_menu.document.runChecker();}</script>';
}
all that will do is print out the script. you need to call the function to get it to work. ut the script up in the head part of the page and then just try this.
PHP Code:
IF ($action == "do_login")
{
setcookie("gdb_user", $upass, time()+3600);
$message = "login will be active for approximately 1 hour";
ECHO "exePricelist()";
}
-
Jun 25th, 2002, 07:27 PM
#7
Thread Starter
Fanatic Member
PHP Code:
IF_($action_==_"do_login")
________{
________setcookie("gdb_user",_$upass,_time()+3600);
________$message_=_"login will be active for approximately 1 hour";
________ECHO_"exePricelist()";
________}
this will just write "exePricelist()" to the screen (i'm writing straight into html here). so how can this work ?
-
Jun 25th, 2002, 07:57 PM
#8
what is with the _ in the code?
ok I figured it would do that. then do it without the echo.
PHP Code:
IF ($action == "do_login")
{
setcookie("gdb_user", $upass, time()+3600);
$message = "login will be active for approximately 1 hour";
exePricelist();
}
or
PHP Code:
IF ($action == "do_login")
{
setcookie("gdb_user", $upass, time()+3600);
$message = "login will be active for approximately 1 hour";
echo "<script>exePricelist();</script>";
}
-
Jun 26th, 2002, 06:21 AM
#9
Thread Starter
Fanatic Member
"exePricelist();" - gives following error: "Fatal error: Call to undefined function: exepricelist() in c:\windows\desktop\files\wwwroot\gdb\admin\action.php on line 9". as expected though, PHP cant directly access javascript functions.
echo_"<script>exePricelist();</script>"; - gives following error: "Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in c:\windows\desktop\files\wwwroot\gdb\admin\action.php on line 9"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|