mardi 26 avril 2016

How to create a checkboxed form in jquery?

I am new to jquery and am struggling with it. I came across this website in hopes of getting help. I need to create a checkbox list that when I select one or more checkboxes then click submit, it shows a name and link combo. So if I have a list of resources in checkbox format and I click the writing and math checkboxes then click submit, it will give me the word writing. When I click on that word it will bring me to a writing page. Here is the list I have and the submit button

<h2 id="studentr">Student Resources</h2>

<section id="information">   
<div id="studentbox">  
<p id="choose">Choose at least one resource and click the 'Show Me' button to display links to selected resources</p> 

<form id="checkboxlist" action="">
<input type="checkbox" name="Career Preparation" id="career" value="http://ift.tt/1T1iAjc">Career Preparation<br>
<input type="checkbox" name="College Advising" id="advising" value="https://http://poly.engineering.asu.edu/advising">College Advising<br>
<input type="checkbox" name="Counseling Services" id="counseling" value="http://ift.tt/1T1iAjg">Counseling Services<br>
<input type="checkbox" name="Finanical Aid" id="fiancialaid" value="http://ift.tt/1SLihPI">Finanical Aid<br>
<input type="checkbox" name="Fitness and Recreation" id="fitnessandrecreation" value="http://fitness.asu.edu/">Fitness and Recreation<br>
<input type="checkbox" name="Health Services" id="healthservices" value="http://ift.tt/1T1iAjj">Health Services<br>
<input type="checkbox" name="Housing" id="housing" value="http://ift.tt/1SLigeB">Housing<br>
<input type="checkbox" name="Library" id="library" value="http://lib.asu.edu/">Library<br>
<input type="checkbox" name="Parking" id="parking" value="https://cfo.asu.edu/pts">Parking<br>
<input type="checkbox" name="scholarships" id="scholarships" value="http://ift.tt/1Ujf0U8">Scholarships<br>
<input type="checkbox" name="Student Employment" id="employment" value="http://ift.tt/25Brg9V">Student Employment<br>
<input type="checkbox" name="Student Organizations" id="organizations" value="http://asu.orgsync.com/">Student Organizations<br>
<input type="checkbox" name="Tutoring Support" id="tutoring" value="http://ift.tt/1KenLi5">Tutoring Support<br>
<input type="checkbox" name="Writing Support" id="writing" value="http://ift.tt/1SLigeD">Writing Support<br>
</form>


<button id="RB1" type="button">Show Me the Resources</button>
</div>  

</section>

<div id="results">
<h3 id="pr">Results</h3>
<p id="statement">You have selected:</p>
</div>




Aucun commentaire:

Enregistrer un commentaire