Results 1 to 9 of 9

Thread: frameset refreshing

  1. #1

    Thread Starter
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609

    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 ?

  2. #2
    Addicted Member TheGoldenShogun's Avatar
    Join Date
    Mar 2001
    Location
    VA/MD... anywhere around the beltway
    Posts
    236
    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

  3. #3

    Thread Starter
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    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"$upasstime()+3600);
            
    $message "login will be active for approximately 1 hour";
            ECHO 
    '<script language="javascript">function exePricelist() {side_menu.document.runChecker();}</script>';
            } 

  4. #4
    Addicted Member TheGoldenShogun's Avatar
    Join Date
    Mar 2001
    Location
    VA/MD... anywhere around the beltway
    Posts
    236
    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.

  5. #5

    Thread Starter
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    thanx, i'll have to have a look at that tomorrow (its 1:00, so i have to go to sceep)

  6. #6
    scoutt
    Guest
    PHP Code:
    IF ($action == "do_login"
            {
            
    setcookie("gdb_user"$upasstime()+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"$upasstime()+3600);
            
    $message "login will be active for approximately 1 hour";
            ECHO 
    "exePricelist()";
            } 

  7. #7

    Thread Starter
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    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 ?

  8. #8
    scoutt
    Guest
    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"$upasstime()+3600);
            
    $message "login will be active for approximately 1 hour";
            
    exePricelist();
            } 
    or

    PHP Code:
    IF ($action == "do_login"
            {
            
    setcookie("gdb_user"$upasstime()+3600);
            
    $message "login will be active for approximately 1 hour";
            echo 
    "<script>exePricelist();</script>";
            } 

  9. #9

    Thread Starter
    Fanatic Member ubunreal69's Avatar
    Join Date
    Apr 2001
    Location
    Morayfield, Australia
    Posts
    609
    "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
  •  



Click Here to Expand Forum to Full Width