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.
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.