dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: updating href when onclick or onchange in drop down box/menu selection

  1. #1
    Join Date
    Feb 2005
    Posts
    13

    updating href when onclick or onchange in drop down box/menu selection

    hi!
    I would like to know if there is a way to update a href link (without page reload) when a selection is made in a drop down box/menu?

    for example:
    [php]<?php
    echo "<select name='subcat' onchange('function to append noticia[x] to href')><option value=''>Select caterogry</option>";
    while (query=true){
    echo "<option selected value='$noticia[x]>$noticia[y]</option>"."<BR>";}

    ?> [php]
    <a href= localhost/?subcat=noticia[x] /a>

    note: the page is not to be reloaded nor are the drop down boxes to be reset when selection is made in menu

    thanks in advance

  2. #2
    Join Date
    Nov 2009
    Posts
    31

    Re: updating href when onclick or onchange in drop down box/menu selection

    you proble want to use client size Javascript rather than server side code for this. Server side would require reloading to the best of my knowledge.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)