Hello,
I have a tab open in my browser which runs my web site. Upon clicking on a button, my site is going to open other windows or tabs with different URLs in each.
<form action="search.php" method="get">
<input type="text" name="item" size="30" style="font-size:140%" id="item">
<input type="submit" value="Search All" style="font-size:140%" id="submit">
</form>
The JS that performs this is provided below:
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function(){
function get(id) {
return document.getElementById(id);
}
$("#submit").click(function() {
get("guitarcentertext").value = get("item").value;
get("music123text").value = get("item").value;
get("musiciansfriendtext").value = get("item").value;
get("prosoundtext").value = get("item").value;
$("input#guitarcenterbutton").click();
$("input#btnSearch").click();
$("input#musiciansfriendbutton").click();
$("input#prosoundbutton").click();
return false;
});
});
</script>
Question: Is there a way that upon the click of another button, I can close the tabs that I previously opened?
Thanks for your help! :)