PDA

View Full Version : Adding "search" to the AnyLink Drop Down Menu



yankeeschick
05-05-2007, 11:44 PM
1) Script Title: Anylink Drop Down Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

3) Describe problem:

Hello All, I used the Anylink drop down script to make a great nav-bar for my site, but now I would like to add a "search" tab to the menu. I would like for google's seach box to pop up when users mouseover the "search" option. When I try putting the code Google adsense gives me into the "menu3[0]=" section, it does not work.

Any suggestions??

THANK YOU!

thetestingsite
05-06-2007, 01:32 AM
Well, you need to remember to escape the quotes and to keep the string on one line (in the code that is) when placing the code in the menu array. In other words, if the code is like this:



<form action='http://google.com/search' method='GET'><input type='text' name='q'><input type='submit' value='Search'></form>


you would have to place it like so:



menu3[0]='<form action=\'http://google.com/search\' method=\'GET\'><input type=\'text\' name=\'q\'> <input type=\'submit\' value=\'Search\'></form>'


Hope this helps.

yankeeschick
05-06-2007, 07:28 PM
Thank you for your help... but it still isnt working :( I put it all on 1 line and put "\" in front of each quotation mark... if anyone can take a look at it and let me know what might be wrong, I would MUCH appreciate it. Thanks!!!



//Contents for menu 5 - Search
var menu5=new Array()
menu5[0]='<form method=\"get\" action=\"http://www.google.com/custom\" target=\"_top\"><table border=\"0\" bgcolor=\"#eeeeee\"><tr><td nowrap=\"nowrap\" valign=\"top\" align=\"left\" height=\"32\"></td><td nowrap=\"nowrap\"><input type=\"hidden\" name=\"domains\" value=\"yankees-chick.blogspot.com\"></input>
<label for=\"sbi\" style=\"display: none\">Enter your search terms</label><input type=\"text\" name=\"q\" size=\"31\" maxlength=\"255\" value=\"\" id=\"sbi\"></input><label for=\"sbb\" style=\"display: none\">Submit search form</label><input type=\"submit\" name=\"sa\" value=\"Google Search\" id=\"sbb\"></input></td></tr><tr><td>&nbsp;</td><td nowrap=\"nowrap\"><table><tr><td><input type=\"radio\" name=\"sitesearch\" value=\"\" checked id=\"ss0\"></input><label for=\"ss0\" title=\"Search the Web\"><font size=\"-1\" color=\"black\">Web</font></label></td><td><input type=\"radio\" name=\"sitesearch\" value=\"yankees-chick.blogspot.com\" id=\"ss1\"></input><label for=\"ss1\" title=\"Search yankees-chick.blogspot.com\"><font size=\"-1\" color=\"black\">yankees-chick.blogspot.com</font></label></td></tr></table><input type=\"hidden\" name=\"client\" value=\"pub-9306521304047602\"></input><input type=\"hidden\" name=\"forid\" value=\"1\"></input><input type=\"hidden\" name=\"ie\" value=\"ISO-8859-1\"></input><input type=\"hidden\" name=\"oe\" value=\"ISO-8859-1\"></input><input type=\"hidden\" name=\"cof\" value=\"GALT:#008000;GL:1;DIV:#336699;VLC:663399;AH:center;BGC:FFFFFF;LBGC:336699;ALC:0000FF;LC:0000FF;T:000000;GFNT:0000FF;GIMP:0000FF;LH:50;LW:282;L:http://yankees-chick.com/bannersm.jpg;S:http://yankees-chick.blogspot.com;FORID:1\"></input><input type=\"hidden\" name=\"hl\" value=\"en\"></input></td></tr></table> </form>'

thetestingsite
05-06-2007, 08:00 PM
I was playing around with it and came up with this so far, but whenever I click inside the menu, I get a javascript error. Perhaps the anylink menu is not what you are looking for. Anyways, you can see what I have been working on by going to http://phphost.smackum.com/dd/anylink.html

yankeeschick
05-06-2007, 09:02 PM
THANK YOU!!!! It works beautifully :)

check out the finished product here: www.yankeeschick.com