Forum Moderators: open

Message Too Old, No Replies

Drop Down Menu Code

SE friendly / Usability

         

Visit Thailand

5:57 am on May 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi! I just wanted to check please whether this code:

a) May pose any problems to spiders?
b) Is compatible in all browsers?

Thank you

<form name="FormName">
<select style="font-size:12px;color:#008888;font-family:arial;background-color:#ffffff;width=160px;" select name="menu" onChange="location=document.FormName.menu.options[document.FormName.menu.selectedIndex].value;" value="GO">
<option value="myurl.com">Option Name</option>
</select>
</form>

rainborick

2:22 pm on May 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Search engines will ignore all of this code because its all JavaScript and they don't read JavaScript. It will not be seen as a link to another page.

Your code is compatible with all browsers running with JavaScript enabled.

Visit Thailand

1:24 am on May 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks rainborik.

This is what I was worried about.

Is there anyway to do the same thing without using Java Script?

rainborick

2:48 am on May 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The short answer to your question is a qualified "yes." You could cram a menu of search engine-readable <a>nchors into a scrolling <div> and have something that is visually similar to a <select> list. You could then use some JavaScript to detect the user's selection and load the indicated page automatically.

But I don't recommend this. First, I'm not really in favor of using a select list of any kind to change pages/location. From a coding standpoint its kind of fun to make stuff happen automagically, but it rubs me the wrong way from a User Interface aspect. I'm a stodgy page designer at heart, I guess, but I prefer more conventional menus, buttons, and text links - something that requires an intentional mouseclick anyway. Second, I think its always good practice to avoid making navigation entirely dependent on JavaScript. If you go ahead with the <select> list navigation, I hope you'll also put some effort into including some plain text links. Good luck!

Visit Thailand

2:55 am on May 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks rainborik, yes the idea is to maintain the regular text links but to add the drop down menu on product pages so that on X product page I can supply the user with a full list of similar products in an easy to use drop down (if I had to list each similar product with text links it would take up too much space and look ugly although there is a text link to a similar products page anyway but that requires two clicks rather than just one throug the drop down).

I guess from what you have said that there may be an advantage to the SE's not finding the links and that would be that it does not mathematically add to the number of links on the page for the SE's but only for the end user.