Ticket #7688 (closed bug: invalid)
WinXP Firefox 3.6.12 - $(document).ready() fires before the document scripts
| Reported by: | iva2k@… | Owned by: | iva2k@… |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.6 |
| Component: | unfiled | Version: | 1.3.2 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I have Drupal 6.19 with jquery_update.module (it loads "jQuery JavaScript Library v1.3.2").
There is some Drupal.behaviors javascript code in <head> scripts loaded on some forms. Drupal invokes behaviors in drupal.js on $document.ready().
Code works OK when GET'ing the form.
When submitting (POST), document.ready fires before all the scripts in <head> are loaded, and code does not get executed.
Same code works fine in Chrome (both GET and POST).
Change History
comment:2 Changed 2 years ago by anonymous
I've created testcase - http://fiddle.jshell.net/iva2k/wekJ5/show/light/
Javascript opens Alert "I'm working!" each time you load the page and submit (click "Free Sign Up" button).
While playing with it, I realized that the reported issue only happens while FireBug is open. If I close the FireBug, the problem is gone. Try it with FireBug and click the button. - the alert is missing!
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Thanks for your time and interest in helping the jQuery project. We require that all bugs include a valid test case exhibiting the behaviour on http://jsfiddle.net or another live example of the code failing. If you can provide a testcase, we will be happy to investigate this issue further.