jeudi 3 novembre 2016

How to access a different page when a user has selected a checkbox and click a button?

I have three checkbox for the users to select from. The third checkbox when it is selected display a form which allows the users to fill in a form and submit it as an email which is working. However what I wanted to do for the other two is to allow the users select any checkbox and then click on button which will take to their appropriate web pages. For example if a user select the checkbox to upload a file and then click a button "next" it will then then take them to the upload file web page.

I am still learning jquery so i would like a bit of help with the jquery/javascript code if it is possible. I have made attempt on the jquery code however i know im doing it right.

<form action="">            
<input type="checkbox" name="radio-1" id="radio-1" onchange = "changeRadio()">
<label for="radio-1">I Want to Upload my own artwork</label>

<input type="checkbox" name="radio-1" id="radio-1" onclick =>
<label for="radio-1">I want to use a pre made template</label>

</br>
<input type="checkbox" name="createartwork" id="createartwork"> 
 <label class="label-for-check" for="createartwork">I want you to create my artwork</label> 

<div id="next-container">
         <button class="card__btn btn" id="nxtBtn" type="button" >Next</button>
         </div>

$(function() {
$('#radio-1').click(function() {
    $('#nxtBtn').prop(
        'disabled',
        (!$(this).prop('checked'))
    );
});

});




Aucun commentaire:

Enregistrer un commentaire