Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question open a different page based on user selection

    I know this may have been asked many times but I have another angle in the question. I am trying to implement a lightbox which works when somebody clicks a link. What i want is the link to be dynamic based on user selection of radio buttons. Let me write the code which will make it more clear

    Code:
    <input id="campus" type="radio" value="All" name="group1" /><label for="campus">All Campuses</label><br>
    		<input id="campus" type="radio" value="Daytona Beach"  name="group1"/><label for="campus">Daytona Beach</label><br>
    			<input id="campus" type="radio" value="Prescott" name="group1" /><label for="campus" >Prescott</label><br>
    				<input id="campus" type="radio"  value="Worldwide" name="group1" /><label for="campus">Worldwide</label><br>
    
    <ul class="postnav">
    <li><a href='javascript:validate()' id="all1"  title="Google" rel="gb_page_center[640, 480]" id="tt">Submit All</a></li>
    </ul>
    the validate function basically checks what was the user selection and returns a text with the website address.

    This doesn't work . Can anyone help me

    Thanks

  • #2
    Regular Coder
    Join Date
    Nov 2007
    Location
    Leeds, UK
    Posts
    514
    Thanks
    24
    Thanked 19 Times in 19 Posts
    PHP Code:
    onclick="document.location.href('*your location here*');" 
    this will change the page location to that location on thier click of that value


  •  

    Posting Permissions

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