I'm trying to incorporate the following HTML "form" code into an aI menu element:
<input name="terms" type="text" onFocus="this.value=''; this.style.backgroundImage='none'; this.style.paddingLeft=0" value="Search" size="18" maxlength="50" class="Search" />
The above code works fine in HTML, but I can't seem to find the correct way to code it in the menu aI element so that it works. Any help would be greatly appreciated. Thanks.
Need Help Incorporating HTML Form Code
Re: Need Help Incorporating HTML Form Code
Hi,
What's happening is you are including semi-colons and equals signs which is confusing the menu parser. What you need to do is enclose the HTML inside backquotes, this means the menu will know NOT to parse the HTML.
You also have double quotes and these too will confuse the parser so what you need to do there is escape the double quotes with the escape character.
Here's the form object that should work:
Hope this helps,
Andy
What's happening is you are including semi-colons and equals signs which is confusing the menu parser. What you need to do is enclose the HTML inside backquotes, this means the menu will know NOT to parse the HTML.
You also have double quotes and these too will confuse the parser so what you need to do there is escape the double quotes with the escape character.
Here's the form object that should work:
Code: Select all
aI("text=`<input name=terms type=text onFocus=\"this.value=''; this.style.backgroundImage='none'; this.style.paddingLeft=0\" value=Search size=18 maxlength=50 class=Search />`;type=form");
Andy