Welcome to WebmasterWorld Guest from 54.145.209.34

Forum Moderators: open

What would make my search form disappear?

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

10+ Year Member



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?
10:58 pm on Jul 11, 2011 (gmt 0)

WebmasterWorld Administrator brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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)

10+ Year Member



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)

10+ Year Member



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!
11:18 pm on Jul 11, 2011 (gmt 0)

WebmasterWorld Administrator brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



What is causing the interference from the ad?
11:26 pm on Jul 11, 2011 (gmt 0)

10+ Year Member



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.
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month