Why is onLoad not working?

Results 1 to 2 of 2

Thread: Why is onLoad not working?

  1. #1
    PJ Guest

    Default Why is onLoad not working?

    Well, it actually works, just not in a particular situation.<BR><BR>I&#039;m using onLoad in the &#060;body&#062; tag to call a function that pulls in a random image for display on the page: <BR>&#060;body onLoad="funcName()"&#062;<BR>It works fine, pulling a fresh, random image every time. It&#039;s not the function itself that is in question, so I don&#039;t need to paste it here. A problem occurs when I use onLoad on a page that submits a form to itself. For example, if I have a search box on the page (step 1) and set it up to submit to the same page to handle the results (step 2), the onLoad event doesn&#039;t seem to fire again. If I refresh the page during step 2, though, onLoad works fine again.<BR><BR>I don&#039;t get an error message. I actually get a broken image instead of a good one (Yes, I have more than verified that all images are mapped correctly!).<BR><BR>Does this sound odd? Does JavaScript not fully recognize that a page is being loaded when a form submits to itself?<BR><BR>Thanks for any insight!<BR>PJ

  2. #2
    McButterson Guest

    Default RE: Why is onLoad not working?

    i dont know how much data your passing in the form, but maybe try a window.location.href="&#060;back to it self&#062;" instead of a submit

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts