It works fine however I want the SUBMIT button to open the link in a new window.
I then made this code:
Code:
<!-- Goes into HEAD and /HEAD -->
<SCRIPT LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=50');");
}</script>
<!-- HEAD END -->
<!-- The HTML -->
<div id="weather"><font color="#333333" face="Arial" style="font-size: 8pt">Enter 4-letter ICAO station identifier.</font>
<FORM method="POST" action="http://adds.aviationweather.noaa.gov/metars/index.php">
<font face="Arial">
<INPUT SIZE="14" NAME="station_ids" TYPE="text" style="font-size: 8pt; font-family: Arial" value="Enter ICAO"></font></font>
<br />
<font face="Arial">
<INPUT TYPE="radio" NAME="std_trans" VALUE="standard" CHECKED=""></font></font><font face="Arial" style="font-size: 8pt" color="#333333"> Raw Format
<br />
</font><font face="Arial">
<font color="#333333">
<INPUT TYPE="radio" NAME="std_trans" VALUE="translated"></font></font><font face="Arial" style="font-size: 8pt" color="#333333"> Translated</font>
<font face="Arial">
<br>
<INPUT TYPE="checkbox" NAME="chk_metars" checked></font></font><font face="Arial" style="font-size: 8pt" color="#333333"> METARs
</font><font face="Arial">
<font color="#333333">
<INPUT TYPE="checkbox" NAME="chk_tafs"></font></font><font face="Arial" style="font-size: 8pt" color="#333333"> TAFs</font>
<br />
<font face="Arial">
<font color="#333333">
<SELECT name="hoursStr" style="font-size: 8pt; font-family: Arial">
<OPTION SELECTED> most recent only</OPTION>
<OPTION> past 1 hours</OPTION>
<OPTION> past 2 hours</OPTION>
<OPTION> past 3 hours</OPTION>
<OPTION> past 4 hours</OPTION>
<OPTION> past 5 hours</OPTION>
<OPTION> past 6 hours</OPTION>
<OPTION> past 12 hours</OPTION>
<OPTION> past 18 hours</OPTION>
<OPTION> past 24 hours</OPTION>
<OPTION> past 36 hours</OPTION>
</SELECT></font></font><font face="Arial" style="font-size: 8pt" color="#333333">
</font>
<font face="Arial">
<br />
<br />
<font color="#333333">
<INPUT NAME="submit" style="font-size: 8pt; font-family: Arial" TYPE="submit" VALUE="Submit" onClick="javascript:popUp('http://adds.aviationweather.noaa.gov/metars/index.php')" >
</font></font><font face="Arial" style="font-size: 8pt" "color:#333333"> </font><font face="Arial"><font color="#333333"><INPUT TYPE="reset" style="font-size: 8pt; font-family: Arial" VALUE="Reset Form"></font></font><font face="Arial" style="font-size: 8pt" color="#333333">
</font></FORM></FORM></div>
Now the problem comes. If I click SUBMIT a new window opens..But it's not with the content, which should be there. Also the new site opens in main window but this does it WITH the right content. (Hope you understand ?) I only want the RIGHT content in the popup window and the main window to stay at MY site.
Hmm I tried to inset your code, but I still can't get it working. I guess it's me, but would you mind explaining where to inset it to get it right? I'm a dummy to this, sorry..
<SCRIPT LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=50');");
}</script>
and here's what I'd change it to:
Quote:
<SCRIPT LANGUAGE="JavaScript">
function createPopup(popupName){
var w = window.open("", popupName, "width=800, height=600, resizable=1");
w.focus();
return true;
}</script>
Here's the original HTML part (only the part that I'd change):
Glenngv, you are the damn best member around here!!!! Thank you so much for keep sticking to this thread, even through I was so damn retarded (I still am :P)
Thank you so much, now it works - you're tha man!!