I might have a strange request. I am not that good as a scripter so the method I used might be strange but a script I made does this: You select an option and this option has a value which is a link. When submitting the form I want the link (=value) to be opened in a new tab. This I achieved but the method I used makes popup blockers block the new window. Do any of you have a idea howto bypass this?
<form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>" method="get" class="formLayout">
<!-- Dropdownlinks-->
<select name="bestemming" size="1" onchange="document.getElementById('text_content').value=this.options[this.selectedIndex].text">
<option value="http://youtube.be">Test1 (YT)</option>
<option value="http://google.be">Test2 (GooGle)</option>
<option value="http://bing.be">Test3 (Bing)</option>
</select
<!-- Terms -->
<br /><input type="checkbox" name="Terms" value="Download">
I agree with terms
<br />
<input type="submit" value="Verzenden" onclick="if(!this.form.Terms.checked){alert('Je moet akkoord gaan met de downloadvoorwaarden!');return false}" /></p>
</form>
<?
$link = ($_GET['bestemming']);
echo '<script language="javascript">window.open("' . $link . '" ,"_blank");</script>';
?>
Do you have any suggestions?
Thank you very much in advance!