How to link to another page having the option to choose the value in the combobox?

Asked

Viewed 118 times

1

My page has a div that makes the link with another page, this other page has a combobox, in which each value brings me a different table from the database.

Javascript that links to the page:

<script>
        function nova(){
            location.href="../Pagina/default.asp?vop=new";
        }
</script>

The code of div:

<div id="daily" align="center" class="botao red margem alignL"     onclick="nova();">
        Pagina_destino<br>Chart<br><img src="images/ic_pareto1.png">
</div>

And the code of combobox:

<select name="linha">
        <option value="ASM1" <%if request.form("linha") = "ASM1" then response.write "selected"%>>Assembly 1</option>
        <option value="ASM2" <%if request.form("linha") = "ASM2" then response.write "selected"%>>Assembly 2</option>
        <option value="ASM3" <%if request.form("linha") = "ASM3" then response.write "selected"%>>Assembly 3</option>
        <option value="ASM4" <%if request.form("linha") = "ASM4" then response.write "selected"%>>Assembly 4</option>
        <option value="ASM5" <%if request.form("linha") = "ASM5" then response.write "selected"%>>Assembly 5</option>
        <option value="ASM6" <%if request.form("linha") = "ASM6" then response.write "selected"%>>Assembly 6</option>
        <option value="ASM7" <%if request.form("linha") = "ASM7" then response.write "selected"%>>Assembly 7</option>
        <option value="ASM8" <%if request.form("linha") = "ASM8" then response.write "selected"%>>Assembly 8</option>
        <option value="ASM9" <%if request.form("linha") = "ASM9" then response.write "selected"%>>Assembly 9</option>
        <option value="ASM10" <%if request.form("linha") = "ASM10" then response.write "selected"%>>Assembly 10</option>
        <option value="ASMX" <%if request.form("linha") = "ASMX" then response.write "selected"%>>Assembly X</option>
        <option value="ASMY" <%if request.form("linha") = "ASMY" then response.write "selected"%>>Assembly Y</option>
        <option value="ASMZ" <%if request.form("linha") = "ASMZ" then response.write "selected"%>>Assembly Z</option>   
    </select>

I would like to not only link to the page but also by href run a value of combobox.

For example:

Page - index.php

On the page index.php has a div, she calls a href in the javascript which in turn redirects me to another page, the default.asp. In that default.asp have a combobox in which each value has a different information, for example.

  • value1 = row 1 information
  • value2 = information from Linha2 and so on

How can I put or bring the value of combobox in the href=default.asp?vop=new plus the value of option? Is it possible to do this or only in ajax even?

I’m not very familiar with ajax, someone knows a simple way of doing in ajax? What I need is to access a value of a combobox another page, and not only redirect me to another page, but also to access the value of combobox

  • The question is not very clear, edit it, put more details. If I understand well you will have to use ajax.

  • Do you have a div that does the link? Why not use the link directly with the <a tag> ??

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.