• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

form onsubmit issue

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please view my page @ http://66.221.164.120
once there, type 'e' in the search text field. hit 'enter'(not the GO button). Hit it again and notice how the document is not closed, it continues.
If i set the form onsubmit handler property to document.close() the page loads and closes but the images never appear because the document was closed too soon. remember now that this is only an issue when hitting the 'enter' key.
The search works fine with the GO button. it closes the page after and the images still load.
Why doesnt the onsubmit work as efficiently?
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
easy fix
onsubmit="document.frames[1].document.close();search(searchForm); count = 0;"
 
Michael McNally
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
wow thanks man! see, i was doing this:
onsubmit="search(searchForm); count = 0;d ocument.frames[1].document.close;"
I guess it is required to close the document first? Thanks again
reply
    Bookmark Topic Watch Topic
  • New Topic