1

I have dropdown and onchange of that dropdown I'm doing some ajax call and updating the table contens like this,

Main_page.php

<select>
    <option>go to one</option>
    <option>go to two</option>
    <option>go to three</option>
    <option>go to four</option>
</select>
<table>
    on change of dropdown will update this contents
</table>

also I have seprate link's like,

http://example.com/Main_page.php/go-to-one

http://example.com/Main_page.php/go-to-two like this

now I want to give these http links to dropdown for SEO purpose and my problem is

<select>
    <option>
        <a href='http://example.com/pages.php/go-to-one'>go to one</a>
    </option>
</select>

This is not working (means <a> tag is not showing in the browser)

Here I can't put href by using javascript or jquery because I am doing this for SEO. Only possibility is I want to put using HTML only.

Can anyone help me to solve this?

Thank you in advance.

Jakob
  • 3,493
  • 4
  • 26
  • 42
harishkumar329
  • 1,210
  • 4
  • 16
  • 34
  • Similar problem asked and resolved on here: http://stackoverflow.com/questions/6418634/onclick-location-href-link-html-does-not-load-page-in-safari –  May 06 '14 at 08:53
  • No, solving using javascript is easiest way, that I know already, But that's not SEO friendly right? I have clearly mentioned that I have to do this for SEO purpose. – harishkumar329 May 06 '14 at 09:03
  • And you show us a small fiddle for it. So that we can try to get you the html linking and also SEO links through JS or without it. – SSS May 06 '14 at 09:26
  • 2
    then you should use some DOM elements other than ` – Ejaz May 06 '14 at 09:26
  • 1
    Try using a Unordered list. And give it a look of select box using css. You will gain the SEO links and Select box look of it. – SSS May 06 '14 at 09:28
  • Really thank you Ejay and SSS. I got an idea I got some examples to do ul li dropdown. Thanks for your valuable comments. – harishkumar329 May 06 '14 at 09:46

1 Answers1

-1

Try this. It worked for me.

<select>
    <option value='http://example.com/pages.php/go-to-one'>go to one</option>
</select>
Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
Zain
  • 7
  • 1
  • 1
  • 10