My users select one, or multiple pages and then get a button which they can then bookmark. This would give them quick acces to the pages they selected in the form.
Clicking this bookmark will open all the pages the user selected at once.
Now, I have most of it working but I'm having trouble with making it "bookmarkable" is there any way to do this? Right now it's only bookmarking an empty submit button with no information saved in it at all.
This is my code:
<form>
<input type="checkbox" id="site1" name="site1" value="site1">site1<br>
<input type="checkbox" id="site2" name="site2" value="site2">site2<br>
<input type="checkbox" id="site3" name="site3" value="site3">site3<br>
<input type="checkbox" id="site4" name="site4" value="site4">site4
<a href="#" onClick="validate(); return false;">Submit</a>
</form>
And my java:
function validate() {
$(":checkbox:checked").each(function() {
var sitename = $(this).val();
window.open('http://www.' + sitename + '.com');
});
return false;
}
This code succesfully opens the selected pages but only when submit is clicked on the page itself. Any help is greatly appreciated!