Problem with search box

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
kelthore
Beginner
Beginner
Posts: 6
Joined: Sat Mar 04, 2006 12:02 pm
Contact:

Problem with search box

Post by kelthore »

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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