PDA

View Full Version : Text Overlying Search Button on Post-Results Page with Highlighted Text


aschecht
04-28-2008, 06:32 AM
When I click on a result from the search results page and am taken to the result with the search term highlighted, text is appearing overlying the search button in the header. I think the text reads "Submit Query" or something like that. This extraneous text appears in IE7 but not in Firefox.

To recreate this issue:
- go to my site: www.icdmeister.com/site/
- search for the term "cardiac"
- click on any search result
- see the text overlying the blue search box in the header.

I suspect I can get rid of this by adding a hidden attribute to the CSS somewhere but not sure where to go.

Any ideas?

Thanks,

Andrew

Ray
04-28-2008, 08:31 AM
We had a look. It appears to be a quirk of IE7, whereby it defaults a "Submit Query" value to an input tag (of type=submit). But it only seems to do this sometimes, and we can't quite work out why.

On your site, it does seem like it's triggered by the highlight script. But when we downloaded a copy of your pages, we were able to reproduce the problem even when the highlight script was completely removed.

I believe the problem is an IE quirk (as also mentioned in the newsgroup here (http://groups.google.com/group/macromedia.dreamweaver/browse_thread/thread/3de81471511fe3a5/bcdc4a4725de6cd5)), and in my testing, I was able to eliminate the problem by assigning an empty value attribute to the input tag.

So in your search form HTML, which is currently as follows:


<DIV class=searchbox>
<FORM action=http://www.icdmeister.com/site/search/search.php method=get>
<INPUT size=12 name=zoom_query>&nbsp;&nbsp;
<INPUT style="BACKGROUND: url(http://www.icdmeister.com/images/search.jpg) no-repeat; WIDTH:
60px; BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT:
24px; BORDER-BOTTOM-STYLE: none; align: center" type=submit>
</FORM></DIV>


Change it to this:


<DIV class=searchbox>
<FORM action=http://www.icdmeister.com/site/search/search.php method=get>
<INPUT size=12 name=zoom_query>&nbsp;&nbsp;
<INPUT style="BACKGROUND: url(http://www.icdmeister.com/images/search.jpg) no-repeat; WIDTH:
60px; BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT:
24px; BORDER-BOTTOM-STYLE: none; align: center" type=submit value="">
</FORM></DIV>


Note the value="" that was added. I think that will fix it.

Update: More information on this behaviour found here (http://verens.com/archives/2005/07/06/ie-bugs-dynamically-creating-form-elements/). This blog entry suggests that it is a bug in IE.

aschecht
04-29-2008, 06:47 AM
Thanks Ray for a thorough and prompt response (as always).


Note the value="" that was added. I think that will fix it.

This did not resolve the problem. With a bit more experimentation, changing value to value=" " (with space between quotation marks) did work.

Thanks,

A.