Jump to content

Pageload triggers ajax window load? How?


Attilitus

Recommended Posts

Sorry for the double post... (there is no edit option?)

I just thought that I would add that I would prefer to do this in PHP "if possible." That is why I have been trying using location headers at the start of loaded content, ect.

Regardless of the method, however, I know that I need to have a "second ajax call" I just do not know how to make a second ajax call at the same time as another without having the user click a second link. I know that there must be an easy way to do it, I am just very new and inexperienced to the world of AJAx.

Thanks for any help you guys might be able to provide.
Link to comment
Share on other sites

You would have 2 copies of your ajax code.

For example: I use this in my ajax code:
[code]
onkeyup="sendRequest(this.value);"
[/code]
Basically, I would have to pick a different event.

You may also have to rename your request for the reload.  So in all scripts the sendRequest() and such scripts would be renamed.  Considering you need no data passed through, I would narrow it down to
sendRequest().  This is just a function I use, they are named similarly with most frameworks.  You would want to make it be onload=sendRequest() (if it is the load of the first div that would fire it up).  Otherwise you can look up javascript documentation to find what function you would want to fire up the second load.  Good luck.  If you need more help feel free to PM me or email mrfg2006 [at] gmail <.> [com]
I don't read through these forums very often so I probably won't get another reply if you don't
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.