Welcome to WebmasterWorld Guest from 54.147.10.12

Forum Moderators: open

Message Too Old, No Replies

What would make my search form disappear?

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

Junior Member

10+ Year Member

joined:May 31, 2002
posts: 157
votes: 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?
10:58 pm on July 11, 2011 (gmt 0)

Moderator from GB 

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

joined:Jan 30, 2002
posts:4842
votes: 1


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 July 11, 2011 (gmt 0)

Junior Member

10+ Year Member

joined:May 31, 2002
posts: 157
votes: 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 July 11, 2011 (gmt 0)

Junior Member

10+ Year Member

joined:May 31, 2002
posts: 157
votes: 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!
11:18 pm on July 11, 2011 (gmt 0)

Moderator from GB 

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

joined:Jan 30, 2002
posts:4842
votes: 1


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

Junior Member

10+ Year Member

joined:May 31, 2002
posts: 157
votes: 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.