homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

What would make my search form disappear?

 10:54 pm on Jul 11, 2011 (gmt 0)

Occasionally when a page on my site finishes loading my search box completely disappears (the box where you input text). I'm using placeholders to put all my javascript code that's used to load ads and other widgets near the </body> tag and I'm sure there's something in this JS code that's causing this to happen. The issue only happens sporadically too, cross-brower. Very aggravating.

I wanted to find out if anyone has ever know a faulty JS code to cause something like this to happen, making search forms (or basically anything using <form>) to disappear? Is there anyway this can be debugged or fixed?


brotherhood of LAN

 10:58 pm on Jul 11, 2011 (gmt 0)

I would install Firebug, and after the page has loaded, inspect your HTML code with it.

If the form doesnt have an ID, give it one and then search for that particular ID in the HTML DOM. Perhaps some JS is removing it or setting the CSS of it to display:none


 11:11 pm on Jul 11, 2011 (gmt 0)

For some odd reason it rarely seems to happen in Firefox. I've loaded it a dozen times and the search form remains. It does disappear much more frequently in Safari and Chrome though. I'll have to use something equivalent to Firebug to test things out there instead.


 11:17 pm on Jul 11, 2011 (gmt 0)

Traced it to one of the rich media ads that runs on my site. No response from the advertiser yet, so don't see any option except to disable the ad for now. Oh well!

brotherhood of LAN

 11:18 pm on Jul 11, 2011 (gmt 0)

What is causing the interference from the ad?


 11:26 pm on Jul 11, 2011 (gmt 0)

I'm not sure, but there's something in the code that seems to affect how it breaks out when you click to expand the ad. Whenever this ad loads that's when the search form disappears, explaining why the issue seemed to occur at random.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved