Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:12

Problem with search box


Poster: kelthore
Dated: Tuesday March 7 2006 - 7:56:17 GMT

i know that the search box has been done but i tried the idea of just stuffing html into the aI(;"); minus the "" in the html, but when i tried it it didnt work. As i dont fully understand javascript yet i dont understand where it is not working.

HTML:
<p><span class="normbod">Search Allakhazam:</span>
<form action="http://wow.allakhazam.com//search.html" target="_blank" name="global_s">
<input name="q" size="12" onchange='if(this.selectedIndex !=0) {document.global_s.submit();}' />
</form>

<span class="normbod">Search Thottbot:</span>
<form method="get" action="http://www.thottbot.com/" target="_blank">
<input type="text" name="s" size="12" onfocus='this.select()' />
</form><p></p>

My converted JS attempt:

with(milonic=new menuname("Search")){
style=menuStyle;
aI("text=<form action=http://wow.allakhazam.com//search.html target=_blank name=global_s><input name=q size=12 onchange='if(this.selectedIndex !=0) {document.global_s.submit();}' /></form>;");
}

not sure what i did wrong


Poster: John
Dated: Tuesday March 7 2006 - 15:06:37 GMT

Remove the ' you have in the JS, and add type=form; at the end.