Jump to content

http request before page submit

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
Guest_jeroenp_*

Guest_jeroenp_*
  • Guests
Hi all,

I'm quiete new to using ajax and I face one problem:

I have a form and I want to call a script when the submit-button is pressed. Therefore I added the onclick() function as onsubmit() didn't work. In the function I call, I want to do a get-request using the XMLHttpReques-object.

The problem is that 90pct of the time I press the submit-button there takes no XMLHttpReques place. When I add a delay after the request line, for instance just an alert-box, the request does take place?!

Does somebody know how to solve this problem?

#2
RobSoftware

RobSoftware

    Programmer

  • Members
  • PipPipPipPip
  • 143 posts
Could you post your code? I've noticed that a lot of times something will work in FireFox but no IE or vise versa. If you post your code I'll see if I can get it to work though.