Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pop up menu

Status
Not open for further replies.

swtdrms007

Programmer
Nov 1, 2000
1
US
I have been trying to make a pop up menu but it doesn't seem to work. Please help me.<HTML>
<TITLE>pricelist</TITLE>
<HEAD>

<SCRIPT LANGUAGE=&quot;JAVASCRIPT&quot;>

function compute(form){
called=true;
if (form.pgs[0].selected){
pgs_print= &quot;3 Pages [$150]&quot;;
pgs_flag=150;
}
if (form.pgs[1].selected){
pgs_flag =200;
pgs_print=&quot;5 Pages [$200]&quot;;
}
else if (form.pgs[2].selected){
pgs_flag =450;
pgs_print=&quot;10 Pages [$450]&quot;;
}

//-------Scrolling------//
if (form.scr[0].selected){
scr_flag=0;
scr_print=&quot;None [$0]&quot;;
}
if (form.scr[1].selected){
scr_flag=50;
scr_print=&quot;One [$50]&quot;;
}
if (form.scr[2].selected){
scr_flag=100;
scr_print=&quot;Two [$100]&quot;;
}
if (form.scr[3].selected){
scr_flag=150;
scr_print=&quot;Three [$150]&quot;;
}
if (form.scr[4].selected){
scr_flag=200;
scr_print=&quot;Four [$200]&quot;;
}
//-------Guestbook-----------//
if (form.gb[0].selected){
gb_flag=0;
gb_print=&quot;None [$0]&quot;;
}
if (form.gb[1].selected){
gb_flag=50;
gb_print=&quot; [$50]&quot;;
}


//-------Scanned Photos-------//
if (form.scanph[0].selected){
scanph_flag=0;
scanph_print=&quot;None [$0]&quot;;
}
if (form.scanph[1].selected){
scanph_flag=5;
scanph_print=&quot;One [$5]&quot;;
}
if (form.scanph[2].selected){
scanph_flag=10;
scanph_print=&quot;Two [$10]&quot;;
}
if (form.scanph[3].selected){
scanph_flag=15;
scanph_print=&quot;Three [$15]&quot;;
}
if (form.scanph[4].selected){
scanph_flag=20;
scanp_print=&quot;Four [$20]&quot;;
}

//-------Animation-------//
if (form.anim[0].selected){
anim_flag=0;
anim_print=&quot;None [$0]&quot;;
}
if (form.anim[1].selected){
anim_flag=50;
anim_print=&quot;One [$50]&quot;;
}
if (form.anim[2].selected){
anim_flag=100;
anim_print=&quot;Two [$100]&quot;;
}
if (form.anim[3].selected){
anim_flag=150;
anim_print=&quot;Three [$150]&quot;;
}
if (form.anim[4].selected){
anim_flag=200;
anim_print=&quot;Four [$200]&quot;;
}

//-------Clock-------//
if (form.clock[0].selected){
clock_flag=0;
clock_print=&quot;None [$0]&quot;;
}
if (form.clock[1].selected){
clock_flag=50;
clock_print=&quot; [$50]&quot;;
}


//-------Weather-------//
if (form.weath[0].selected){
weath_flag=0;
weath_print=&quot;None [$0]&quot;;
}
if (form.weath[1].selected){
weath_flag=25;
weath_print=&quot; [$25]&quot;;
}

//----------Pop-Up Menu------//
if (form.popup[0].selected){
popup_flag=0;
popup_print=&quot;None [$0]&quot;;
}
if (form.popup[1].selected){
popup_flag=50;
popup_print=&quot; [ $50]&quot;;
}

//----------Drop-down Menu-------//
if (form.drop[0].selected){
drop_flag=0;
drop_print= &quot;None [$0]&quot;;
}
if (form.drop[1].selected){
drop_flag=75;
drop_print=&quot;One [$75]&quot;;
}
if (form.drop[2].selected){
drop_flag=120;
drop_print=&quot;Two [$120]&quot;;
}
if (form.drop[3].selected){
drop_flag=150;
drop_print=&quot;Three [$150]&quot;;
}
if (form.drop[4].selected){
drop_flag=175;
drop_print=&quot;Four [$175]&quot;;
}
T_Price=pgs_flag+scr_flag+gb_flag+scanph_flag+anim_flag+ clock_flag+weath_flag+pop_flag+drop_flag+;form.T_Price.value=&quot; $ &quot;+ T_Price;
}

function print(form){
if(!called){
compute(form);
}
text = (&quot;<HEAD><TITLE>'WEB WIZZARDS SITE ESTIMATOR'</TITLE></HEAD>&quot;);
text = (text +&quot;<BODY BGCOLOR = 'WHITE' ><CENTER><B><FONT SIZE = 4><FONT COLOR=PURPLE>SITE ESTIMATOR</FONT></FONT></B>&quot;);
text= (text +&quot;<br></CENTER>&quot;);
text=(text+&quot;<hr>&quot;);
text=(text+&quot;<TABLE BORDER =0><TR VALIGN=Top><TD VALIGN=Top>&quot;);
text=(text+&quot;<B>PAGES<BR>SCROLLING<BR>GUESTBOOK<BR>SCANNED PHOTOS <BR>ANIMATION <BR>CLOCK<BR>POP-UP WINDOW <BR>DROP DOWN MENU<BR>&quot;);
text=(text+&quot;</B></TD><TD>&quot;)
text=(text+&quot;<B>&quot;+ pgs_print+&quot;<BR>&quot;+scr_print+&quot;<BR>&quot;+ gb_print+&quot;<BR>&quot;+ scanph_print+&quot;<BR>&quot;);
text=(text+ anim_print+&quot;<BR>&quot;+clock_print+&quot;<BR>&quot;+ weath_print+&quot;<BR>&quot;+ pop_print+&quot;<BR>&quot;);
text=(text+drop_print+&quot;<BR>&quot; );
text=(text+&quot;<TD></TR></TABLE><hr>&quot;);
text=(text+&quot;<B><FONT COLOR=RED>Total :</FONT>&quot;+&quot; &nbsp &nbsp &nbsp $&quot;+T_Price);
text=(text+&quot;<BR><BR><BR><BR><BR><FONT SIZE=-1><FONT COLOR=Blue>To print, choose FILE and PRINT.</FONT></FONT>&quot;);
text=(text+&quot;</body></html>&quot;);
msgWindow=window.open(&quot;&quot;,&quot;displayWindow&quot;,&quot;toolbar=no,width=375,height=480,directories=no,status=yes,scrollbars=yes,resize=no,menubar=yes&quot;)
msgWindow.document.write(text)
msgWindow.document.close()
</SCRIPT>
</HEAD>

<CENTER>
<FORM method=post>
<TABLE BORDER CELLPADDING=&quot;2&quot; border=0>
<CAPTION></CAPTION>
<TR><TD><CENTER><B>PAGES <P></CENTER></B>
<SELECT NAME=&quot;pgs&quot;>
<OPTION Selected> Select
<OPTION> 3 PAGES [$150]
<OPTION> 5 PAGES [$200]
<OPTION> 10 PAGES [$450]

</SELECT>
</TD>

<TD><CENTER><B>SCROLLING <P></CENTER></B>
<SELECT NAME=&quot;scr&quot;>
<OPTION Selected> Select
<OPTION> One [$50]
<OPTION> Two [$100]
<OPTION> Three [$150]
</SELECT>
</TD>

<TD><CENTER><B>GUEST BOOK <P></CENTER></B>
<SELECT NAME=&quot;gb&quot;>
<OPTION> Select
<OPTION> [$50]

</SELECT>
</TD>
</TR>

<TR><TD><CENTER><B>SCANNED PHOTOS</CENTER></B> <P>
<SELECT NAME=&quot;scanph&quot;>
<OPTION> Select
<OPTION> One [$5]
<OPTION> Two[$10]
<OPTION> Three [$15]
<OPTION> Four [$20]
</SELECT>
</TD>

<TD><CENTER><B>ANIMATION <P></CENTER></B>
<SELECT NAME=&quot;anim&quot;>
<OPTION> Select
<OPTION> One [$50]
<OPTION> Two [$100]
<OPTION> Three [$150]
<OPTION> Four [$200]
</SELECT>
</TD>

<TD><CENTER><B>CLOCK <P></CENTER></B>
<SELECT NAME=&quot;clock&quot;>
<OPTION> Select
<OPTION> [$25]

</SELECT>
</TD>
</TR>

<TR><TD><CENTER><B>WEATHER <P></CENTER></B>
<SELECT NAME=&quot;weath&quot;>
<OPTION> Select
<OPTION> [$25]

</SELECT>
</TD>

<TD><CENTER><B>POP-UP WINDOW <P></CENTER></B>
<SELECT NAME=&quot;pop&quot;>
<OPTION Selected> Select
<OPTION> [ $50]

</SELECT>
</TD>



<TD><CENTER><B>DROP-DOWN MENU <P></CENTER></B>
<SELECT NAME=&quot;drop&quot;>
<OPTION Selected> Select
<OPTION> One [$75]
<OPTION> Two [$120]
<OPTION> Three [$150]
<OPTION> Four [$175]
</SELECT>
</TD>

</TR>
</TABLE>
<P>
<TABLE BORDER CELLPADDING=&quot;2&quot;>
<TR><TD><center><BR>
<INPUT TYPE=&quot;BUTTON&quot; NAME=&quot;Price&quot; Value=&quot;Update Price&quot; onClick=&quot;compute(this.form)&quot;>
</center>
<BR>
<INPUT TYPE=&quot;text&quot; SIZE=15 NAME=&quot;T_Price&quot; value=&quot;&quot;>
<br></TD><TD>
<INPUT TYPE=&quot;BUTTON&quot; NAME=&quot;Print_data&quot; Value=&quot;Print Preview&quot; onClick=&quot;print(this.form)&quot;>
</center></TD></TR>

</TABLE>
<P>
</FORM>
<P>
</FORM>
</CENTER>
</FONT>
</body>
</HTML>


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top