strange things happened in mexico..

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kiyoshi
    New Member
    • Dec 2007
    • 4

    strange things happened in mexico..

    i have a menu.php, which calls login.php inside a <div>, then login.php calls aother-file.php to check the usr and psw in a database... if the user is logged on, i need to change the status div.. the status div is in the same page of menu.php.. but doesnt work.. how can i refresh the status div? i tried to use ajax.updater and nothing, directly write in the file $('usr_status') .innerHTML='adm in'; and nothing happened...


    please.. help!!!!
  • kiyoshi
    New Member
    • Dec 2007
    • 4

    #2
    i resolve this.. now.. how can i call a function automatically, when a file is running?

    i mean...in the second file, i put a <input type=button onclick=funcion 1();>
    i put function funcion1 in the menu.php and. it works.. now.. i want funcion1 runs when this file loads...

    Comment

    • gits
      Recognized Expert Moderator Expert
      • May 2007
      • 5388

      #3
      hi ...

      you may use the body's onload method:

      [HTML]<script type="text/javascript">
      function func() {
      alert('now running on load');
      }
      </script>
      <body onload="func(); ">
      testtext
      </body>
      [/HTML]
      kind regards

      Comment

      • kiyoshi
        New Member
        • Dec 2007
        • 4

        #4
        hi..
        thnx.. didnt work..


        [CODE=php]<?php
        $valid=$_GET['valid'];
        if ($valid=='adm')
        {

        echo"login..";
        echo"<input type=button onclick='alerta ();'>";

        }
        ?>
        <script type="text/javascript">

        function func()
        {
        alert('dentro') ;
        }
        </script>
        <body onLoad="func()" ;>
        some text here
        </body>[/CODE]

        --
        i have this, if i type mydmain.com/this.php it works but.. inside the program , it's called from a login.php with header("locatio n: this.php?valid= adm");

        and doesnt works... :(

        thanks anyway.. ithink i need to spread my page into 2 frames :(

        Originally posted by gits
        hi ...

        you may use the body's onload method:

        [HTML]<script type="text/javascript">
        function func() {
        alert('now running on load');
        }
        </script>
        <body onload="func(); ">
        testtext
        </body>
        [/HTML]
        kind regards
        Last edited by gits; Dec 12 '07, 06:43 PM. Reason: added code tags

        Comment

        Working...