Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: Form to frame in new window?


Message #1 by "Donald" <donaldh@r...> on Sun, 9 Feb 2003 15:31:24
Hi,

I was wondering if anyone is able to help with the following problem.


On submitting a for data should be passed into a specific frame in a new 
window.


Below is the javascript I am using at the moment, which just opens into a 
new page.


<script>
var _newWin=null;
function openIt(_form)

{
  var _options="menubar=no,scrollbars=yes,width=800,height=500;" /* define 
some if you want to */
  _newWin=window.open("","",_options);
  _newWin.document.open();


  var _s ="";
      _s+="<html><body>";
	  _s+="<DIV ID='splashScreen' STYLE='position:absolute;z-
index:0;top:30%;left:30%;'>";
	  _s+="<TABLE BGCOLOR='#C00E0D' BORDER=1 BORDERCOLOR='#C00E0D' 
CELLPADDING=0 CELLSPACING=0 HEIGHT=200 WIDTH=300>";
	  _s+="<TR><TD WIDTH='100%' HEIGHT='100%' BGCOLOR='#FFFFFF' 
ALIGN='CENTER' VALIGN='MIDDLE'><BR><BR>";
	  _s+="<FONT FACE='Helvetica,Verdana,Arial' SIZE=3 
COLOR='#C00E0D'><B>Please Wait</B><BR>Searching.....</FONT><BR>"; 
     _s</TD></TR></TABLE></DIV>";
	  _s+="<form method=post name=f1 
action='http://wwwndt1.xxx.xxxx.net/pl/xxxxxx/en/AAGETAVAIL.hot'>";
	  _s+="<input type=hidden name=LANGUAGE 
value='"+_form.LANGUAGE.value+"'>";
	  _s+="<input type=hidden name=SITE value='"+_form.SITE.value+"'>";
	  _s+="<input type=hidden name=FCT value='"+_form.FCT.value+"'>";
	  _s+="<input type=hidden name=TripType 
value='"+_form.TripType.value+"'>";
	  _s+="<input type=hidden name=SEARCH_BY 
value='"+_form.SEARCH_BY.value+"'>";
	  _s+="<input type=hidden name=D_TimeWindow 
value='"+_form.D_TimeWindow.value+"'>";
	  _s+="<input type=hidden name=D_City 
value='"+_form.D_City.value+"'>";
	  _s+="<input type=hidden name=A_City 
value='"+_form.A_City.value+"'>";
	  _s+="<input type=hidden name=D_Day 
value='"+_form.D_Day.value+"'>";
	  _s+="<input type=hidden name=D_Month 
value='"+_form.D_Month.value+"'>";
	  _s+="<input type=hidden name=D_Time 
value='"+_form.D_Time.value+"'>";
	  _s+="<input type=hidden name=R_Day 
value='"+_form.R_Day.value+"'>";
	  _s+="<input type=hidden name=R_Month 
value='"+_form.R_Month.value+"'>";
	  _s+="<input type=hidden name=R_Time 
value='"+_form.R_Time.value+"'>";
	  _s+="<input type=hidden name=PaxType1 
value='"+_form.PaxType1.value+"'>";
	  _s+="<input type=hidden name=ClassOfService 
value='"+_form.ClassOfService.value+"'>";
	  _s+="<"+"script>";
	  _s+="document.write('');";
	  _s+="document.f1.submit();";
	  _s+="</"+"script>";
	  _s+="</form>";
	  _s+="</body></html>";
  _newWin.document.write(_s);
  _newWin.document.close();
}
</script>



Thanks for you time.



Donald.

  Return to Index