Soooooo........... boys and girls.

I am trying to do a simple ajax request and I am better seeing and doing than learning from a tutorial. So, I just need help for when a player levels up that it will update the user level at the top of the screen.

echo"<div id=\"CharacterLevel\"><center><font style=\"color: white\">The level $User[Level] $User[Race] $User[Class2]  $User[Playername].</font></center></div>";

This is my DIV that I want to update. But my problem thinking it trying to update from a completely different area of script.
From the fight.php script to the main.php script where the div is located. The fight.php is located within the main.php

So if you can think anything up for me you will be truly loved!

    The backend script doesn't really matter. What matters is the page the user is actually looking at (the one that has the displayed <div>). That page has JavaScript that sends a request to the server which runs the necessary script to do whatever needs doing and outputs a result containing the new information, the server sends the result back to the page, and the JavaScript updates the <div> appropriately.

    You'll have to be a bit more explicit about what you're doing.

      Okay well you have already seen the div where I want the ajax to update which is located on main.php.

      From fight.php is where I want it to send the request to update the div. Fight.php is located in main.php

      <th>
      <a class=\"a\" href=\"#non\"
      onmouseover=\"gettip('<center>Click to fight against monsters in your area.  (TIP: Different zones mean different monsters.)</center><br />')\"
      onmouseout=\"reset()\"
        onclick=\"frame('fight.php')\">Fight</a>
      </th>

      I want to create a ajax request from fight.php to main.php saying to update the div when the character levels up from fight.php.

      How is that?

        i might done it with sessions.

        if there are more then one page.

        first page is the form, you write something,

        on the second page there is an ajax check, if the session page refresh set into true,
        then change the actual valu from session.

        Beffic;10891791 wrote:

        Okay well you have already seen the div where I want the ajax to update which is located on main.php.

        From fight.php is where I want it to send the request to update the div. Fight.php is located in main.php

        <th>
        <a class=\"a\" href=\"#non\"
        onmouseover=\"gettip('<center>Click to fight against monsters in your area.  (TIP: Different zones mean different monsters.)</center><br />')\"
        onmouseout=\"reset()\"
          onclick=\"frame('fight.php')\">Fight</a>
        </th>

        I want to create a ajax request from fight.php to main.php saying to update the div when the character levels up from fight.php.

        How is that?

          Any idea of how that would look. Cause like I said this is pretty much learning purposes and I am not good with tutorials at all. I am more visual.

            17 days later

            Would <DIV> Get the job done?

              Write a Reply...