Help - Search - Members - Calendar
Full Version: Search template problem
Movable Type Community Forum > Using Movable Type > Templates and Tags
mistersugar
On my site I have a search box using this:

CODE
<form method="get" action="<$MTCGIPath$><$MTSearchScript$>">
<input type="hidden" name="IncludeBlogs" value="<$MTBlogID$>" />
<input id="search" name=q maxlength=256 value=" search zuiker.com" onfocus="this.value='';" class="search"><input type="submit" value="search" class="button"/></form>

but try to search using it, and it takes you to the default search page with no results. On this page, if you enter the same search in the field under "Search this site:" you do get results.

So, I've figured out the 'name ... onfocus' bit of my code must be the culprit. But, I don't have the relevant knowledge (I borrowed this code from someone once long ago).

Any suggestions?

Anton
maddy
CODE
<form method="get" action="<$MTCGIPath$><$MTSearchScript$>">
<input type="hidden" name="IncludeBlogs" value="<$MTBlogID$>" />
<input id="search" name="search" value="search zuiker.com" onfocus="this.value='' " class="search" />
<input type="submit" value="search" class="button" />
</form>

Does it work without the semi-colon in there? huh.gif
mistersugar
Looks like the problem was the path to the search script. I've replaced it with an absolute URL, and all is fine.

Thanks for your help, maddy.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.