Jump to content

Html + Vb Not Working In Ff?


Recommended Posts

HiI'm trying to get my script to work in FF, but as you can predict (else I wouldnt ask this) it doesnt work.To be honest I dont know if it's VBscript related or html.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><HTML><HEAD>	<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1"><script LANGUAGE="VBScript"><!--Sub Submit_OnClick  dim peil  dim totaal  dim dia 	  Dim TheForm  dim tabelplaatsonder  dim tabelplaatsboven   dim waardetussen  dim waardeA  dim waardeB  dim overschot  dim subtotaal  dim tabel(100)   tabel(1) = 0.16  tabel(2) = 0.47  tabel(3) = 0.87  tabel(4) = 1.34  tabel(5) = 1.86  tabel(6) = 2.44  tabel(7) = 3.07  tabel(8) = 3.74  tabel(9) = 4.45  tabel(10) = 5.20  tabel(11) = 5.98  tabel(12) = 6.79  tabel(13) = 7.63  tabel(14) = 8.50  tabel(15) = 9.40  tabel(16) = 10.32  tabel(17) = 11.27  tabel(18) = 12.24  tabel(19) = 13.22  tabel(20) = 14.23  tabel(21) = 15.26  tabel(22) = 16.31  tabel(23) = 17.37  tabel(24) = 18.45  tabel(25) = 19.55  tabel(26) = 20.66  tabel(27) = 21.78  tabel(28) = 22.92  tabel(29) = 24.07  tabel(30) = 25.23  tabel(31) = 26.40  tabel(32) = 27.58  tabel(33) = 28.77  tabel(34) = 29.98  tabel(35) = 31.19  tabel(36) = 32.41  tabel(37) = 33.63  tabel(38) = 34.86  tabel(39) = 36.10  tabel(40) = 37.35  tabel(41) = 38.60  tabel(42) = 39.85  tabel(43) = 41.11  tabel(44) = 42.37  tabel(45) = 43.64  tabel(46) = 44.91  tabel(47) = 46.18  tabel(48) = 47.45  tabel(49) = 48.72  tabel(50) = 50.00  tabel(51) = 51.27  tabel(52) = 52.54  tabel(53) = 53.81  tabel(54) = 55.08  tabel(55) = 56.35  tabel(56) = 57.62  tabel(57) = 58.88  tabel(58) = 60.14  tabel(59) = 61.39  tabel(60) = 62.64  tabel(61) = 63.89  tabel(62) = 65.13  tabel(63) = 66.36  tabel(64) = 67.58  tabel(65) = 68.80  tabel(66) = 70.01  tabel(67) = 71.22  tabel(68) = 72.41  tabel(69) = 73.59  tabel(70) = 74.76  tabel(71) = 75.92  tabel(72) = 77.07  tabel(73) = 78.21  tabel(74) = 79.34  tabel(75) = 80.45  tabel(76) = 81.54  tabel(77) = 82.62  tabel(78) = 83.68  tabel(79) = 84.73  tabel(80) = 85.76  tabel(81) = 86.77  tabel(82) = 87.75  tabel(83) = 88.72  tabel(84) = 89.67  tabel(85) = 90.59  tabel(86) = 91.49  tabel(87) = 92.36  tabel(88) = 93.20  tabel(89) = 94.01  tabel(90) = 94.79  tabel(91) = 95.54  tabel(92) = 96.25  tabel(93) = 96.92  tabel(94) = 97.55  tabel(95) = 98.13  tabel(96) = 98.65  tabel(97) = 99.12  tabel(98) = 99.52  tabel(99) = 99.83  tabel(100) = 100  Set TheForm = Document.cil1  set peil = theform.peilf  set dia = theform.diaf  totaal = theform.totaalf.value  subtotaal = theform.peilf.value / theform.diaf.value  subtotaal = subtotaal * 100  tabelplaatsonder = round (subtotaal,0)  overschot = (subtotaal * 100) - (tabelplaatsonder * 100)  overschot = round (overschot,0)  tabelplaatsboven = tabelplaatsonder + 1   waardeA = tabel(tabelplaatsonder)  waardeB = tabel(tabelplaatsboven)  waardetussen = ((waardeB - waardeA) / 100) * overschot   waardeA = waardeA + waardetussen     theform.result.value = (totaal / 100) * waardeA  End Sub--></script><script LANGUAGE="VBScript"><!--Sub bereken_OnClick  dim peil1  dim peil2  dim dia 	  Dim TheForm  dim tabelplaatsonder  dim tabelplaatsboven   dim waardetussen  dim waardeA  dim waardeB  dim overschot  dim subtotaal  dim subtotaal2  dim totlos  dim tabel(100)   tabel(1) = 0.16  tabel(2) = 0.47  tabel(3) = 0.87  tabel(4) = 1.34  tabel(5) = 1.86  tabel(6) = 2.44  tabel(7) = 3.07  tabel(8) = 3.74  tabel(9) = 4.45  tabel(10) = 5.20  tabel(11) = 5.98  tabel(12) = 6.79  tabel(13) = 7.63  tabel(14) = 8.50  tabel(15) = 9.40  tabel(16) = 10.32  tabel(17) = 11.27  tabel(18) = 12.24  tabel(19) = 13.22  tabel(20) = 14.23  tabel(21) = 15.26  tabel(22) = 16.31  tabel(23) = 17.37  tabel(24) = 18.45  tabel(25) = 19.55  tabel(26) = 20.66  tabel(27) = 21.78  tabel(28) = 22.92  tabel(29) = 24.07  tabel(30) = 25.23  tabel(31) = 26.40  tabel(32) = 27.58  tabel(33) = 28.77  tabel(34) = 29.98  tabel(35) = 31.19  tabel(36) = 32.41  tabel(37) = 33.63  tabel(38) = 34.86  tabel(39) = 36.10  tabel(40) = 37.35  tabel(41) = 38.60  tabel(42) = 39.85  tabel(43) = 41.11  tabel(44) = 42.37  tabel(45) = 43.64  tabel(46) = 44.91  tabel(47) = 46.18  tabel(48) = 47.45  tabel(49) = 48.72  tabel(50) = 50.00  tabel(51) = 51.27  tabel(52) = 52.54  tabel(53) = 53.81  tabel(54) = 55.08  tabel(55) = 56.35  tabel(56) = 57.62  tabel(57) = 58.88  tabel(58) = 60.14  tabel(59) = 61.39  tabel(60) = 62.64  tabel(61) = 63.89  tabel(62) = 65.13  tabel(63) = 66.36  tabel(64) = 67.58  tabel(65) = 68.80  tabel(66) = 70.01  tabel(67) = 71.22  tabel(68) = 72.41  tabel(69) = 73.59  tabel(70) = 74.76  tabel(71) = 75.92  tabel(72) = 77.07  tabel(73) = 78.21  tabel(74) = 79.34  tabel(75) = 80.45  tabel(76) = 81.54  tabel(77) = 82.62  tabel(78) = 83.68  tabel(79) = 84.73  tabel(80) = 85.76  tabel(81) = 86.77  tabel(82) = 87.75  tabel(83) = 88.72  tabel(84) = 89.67  tabel(85) = 90.59  tabel(86) = 91.49  tabel(87) = 92.36  tabel(88) = 93.20  tabel(89) = 94.01  tabel(90) = 94.79  tabel(91) = 95.54  tabel(92) = 96.25  tabel(93) = 96.92  tabel(94) = 97.55  tabel(95) = 98.13  tabel(96) = 98.65  tabel(97) = 99.12  tabel(98) = 99.52  tabel(99) = 99.83  tabel(100) = 100  Set TheForm = Document.cil2  peil1 = theform.cmvoorlos.value  peil2 = theform.cmnalos.value  totlos = theform.totf.value  subtotaal = peil1 / theform.diaf2.value  subtotaal = subtotaal * 100  tabelplaatsonder = round (subtotaal,0)  overschot = (subtotaal * 100) - (tabelplaatsonder * 100)  overschot = round (overschot,0)  tabelplaatsboven = tabelplaatsonder + 1   waardeA = tabel(tabelplaatsonder)  waardeB = tabel(tabelplaatsboven)  waardetussen = ((waardeB - waardeA) / 100) * overschot   waardeA = waardeA + waardetussen   subtotaal = waardeA    subtotaal2 = peil2 / theform.diaf2.value  subtotaal2 = subtotaal2 * 100  tabelplaatsonder = round (subtotaal2,0)  overschot = (subtotaal2 * 100) - (tabelplaatsonder * 100)  overschot = round (overschot,0)  tabelplaatsboven = tabelplaatsonder + 1   waardeA = tabel(tabelplaatsonder)  waardeB = tabel(tabelplaatsboven)  waardetussen = ((waardeB - waardeA) / 100) * overschot   waardeA = waardeA + waardetussen   subtotaal2 = waardeA  subtotaal = subtotaal2 - subtotaal  theform.result2.value = round((totlos / subtotaal) * 100)  End Sub--></script><script language="VBScript">sub berk_onclickdim lengtedim breedtedim hoogtedim totaallengte = document.recht.lengtef.valuebreedte = document.recht.breedtef.valuehoogte = document.recht.hoogtef.valuetotaal = lengte * breedte * hoogte / 1000document.recht.totf.value = totaalend sub</script><script language="VBScript">sub berk2_onclickdim lengtedim breedtedim hoogtedim totaallengte = document.recht2.lengtef2.valuebreedte = document.recht2.breedtef2.valuehoogte = document.recht2.hoogtef2.valuetotaal = lengte * breedte * hoogte / 1000document.recht2.totf2.value = totaalend sub</script>	<TITLE>****</TITLE>	<STYLE TYPE="text/css">	<!--	BODY	 {			scrollbar-arrow-color : #FFFFFF			;			scrollbar-base-color : #636A74			;			scrollbar-highlight-color : #BDCDD2			;			scrollbar-face-color : #878C94			;			scrollbar-shadow-color : #878C94							}	a:hover	 {			Color : b				;			Background-Color : b		}	a:hover	 {			Background-Color : b			;			Color : red		}	-->	</STYLE></HEAD><BODY LINK="#666666" ALINK="#666666" VLINK="#666666"><DIV>	<P>	<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">		<TR>			<TD WIDTH="3%"> </TD>			<TD WIDTH="97%">				<DIV>					<P>					<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="81%">						<TR>							<TD VALIGN="TOP">								<DIV>									<P><B><FONT SIZE="3" FACE="Verdana, Arial, Helvetica, sans-serif">Tankinhoud berekenen :</FONT></B></P>									<P><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Indien u wilt berekenen hoeveel liter product er									nog in uw tank aanwezig is :<BR>									</FONT><A HREF="#11"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">voor een cilindervormige tank</FONT></A><FONT									SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><BR>									</FONT><A HREF="#2"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">voor een rechthoekige tank</FONT></A></P>									<P><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Indien u de totale opslagcapaciteit van uw tank									wilt berekenen :<BR>									</FONT><A HREF="#12"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">voor een cilindervormige tank</FONT></A><FONT									SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><BR>									</FONT><A HREF="#22"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">voor een rechthoekige tank</FONT></A></P>									<P><A HREF="#22"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><BR>									</A></FONT></A><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><A NAME="11"></A></FONT><B><B><FONT									SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Berekening voor een cilindervormige tank<BR>									(hoeveelheid product aanwezig)</FONT></B></B></P>									<P><FORM METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" name="cil1"> 									<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="55%" BGCOLOR="white">										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Geef het aantal cm nog aanwezig in uw tank :<BR>												<INPUT TYPE="TEXT" NAME="peilf" SIZE="25"> cm</FONT></TD>										</TR>										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Geef de maximumcapaciteit van uw tank :<BR>												<INPUT TYPE="TEXT" NAME="totaalf" SIZE="25"> liter</FONT></TD>										</TR>										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Geef de diameter van uw tank :<BR>												<INPUT TYPE="TEXT" NAME="diaf" SIZE="25" VALUE="127"> (standaard)</FONT></TD>										</TR>										<TR>											<TD WIDTH="100%" HEIGHT="35"><B><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">De inhoud van uw tank is :<BR>												</FONT></B><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT TYPE="TEXT" NAME="result" SIZE="25"></FONT><B><FONT												SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"> Liter</FONT></B></TD>										</TR>										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><input type="button" name="submit" value="Bereken"></FONT></TD>										</TR>									</TABLE><HR ALIGN="CENTER"></P>									<P><A NAME="12"></A><B><B><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Berekening voor een cilindervormige									tank <BR>									(voor totale inhoud van de tank)</FONT></B></B></P>									<P>									</FORM><FORM METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" name="cil2"> 									<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="55%" BGCOLOR="white">										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Geef de diameter van uw tank :<BR>												<INPUT TYPE="TEXT" NAME="diaf2" SIZE="25" VALUE="127"> (standaard)</FONT></TD>										</TR>										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Geef het aantal cm product in de tank voor lossing												:<BR>												<INPUT TYPE="TEXT" NAME="cmvoorlos" SIZE="25"> cm</FONT></TD>										</TR>										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Geef het aantal cm product in de tank na lossing :<BR>												<INPUT TYPE="TEXT" NAME="cmnalos" SIZE="25"> cm</FONT></TD>										</TR>										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Geef het aantal liter dat er gelost is :<BR>												<INPUT TYPE="TEXT" NAME="totf" SIZE="25"> liter</FONT></TD>										</TR>										<TR VALIGN="MIDDLE">											<TD WIDTH="100%" HEIGHT="35"><B><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">De totale inhoud van uw tank is :<BR>												</FONT></B><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT TYPE="TEXT" NAME="result2" SIZE="25"></FONT><B><FONT												SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"> Liter</FONT></B></TD>										</TR>										<TR>											<TD WIDTH="100%"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><input type="button" name="bereken" value="Bereken"></FONT></TD>										</TR>									</TABLE><HR ALIGN="CENTER"></P>									<P><A NAME="2"></A><B><B><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">RECHTHOEKIGE TANK<BR>									(hoeveelheid product aanwezig)</FONT></B></B></P>									<P>									</FORM><FORM METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" name="recht"> 									<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="55%">										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Geef het aantal cm nog aanwezig :<BR>												<INPUT TYPE="TEXT" NAME="hoogtef" SIZE="25"> cm</FONT></TD>										</TR>										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Geef de lengte van uw tank :<BR>												<INPUT TYPE="TEXT" NAME="lengtef" SIZE="25"> cm</FONT></TD>										</TR>										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Geef de breedte van uw tank :<BR>												<INPUT TYPE="TEXT" NAME="breedtef" SIZE="25"> cm</FONT></TD>										</TR>										<TR>											<TD WIDTH="100%" HEIGHT="35"><B><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">De inhoud van uw tank is :<BR>												</FONT></B><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT TYPE="TEXT" NAME="totf" SIZE="25"></FONT><B><FONT												SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"> Liter</FONT></B></TD>										</TR>										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><input type="button" name="berk" value="Bereken"></FONT></TD>										</TR>									</TABLE></P>									<P><A NAME="22"></A><B><B><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">RECHTHOEKIGE TANK<BR>									(voor totale inhoud van de tank)</FONT></B></B></P>									<P>									</FORM><FORM METHOD="POST" ENCTYPE="application/x-www-form-urlencoded" name="recht2"> 									<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="55%" BGCOLOR="white">										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Geef de hoogte van uw tank :<BR>												<INPUT TYPE="TEXT" NAME="hoogtef2" SIZE="25"> cm</FONT></TD>										</TR>										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Geef de lengte van uw tank :<BR>												<INPUT TYPE="TEXT" NAME="lengtef2" SIZE="25"> cm</FONT></TD>										</TR>										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">Geef de breedte van uw tank :<BR>												<INPUT TYPE="TEXT" NAME="breedtef2" SIZE="25"> cm</FONT></TD>										</TR>										<TR>											<TD WIDTH="100%" HEIGHT="35"><B><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif">De totaalinhoud van uw tank is :<BR>												</FONT></B><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><INPUT TYPE="TEXT" NAME="totf2" SIZE="25"></FONT><B><FONT												SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"> Liter</FONT></B></TD>										</TR>										<TR>											<TD WIDTH="100%" HEIGHT="35"><FONT SIZE="2" FACE="Verdana, Arial, Helvetica, sans-serif"><input type="button" name="berk2" value="Bereken"></FONT></TD>										</TR>									</TABLE>								</DIV>							</TD>						</TR>					</TABLE>				</DIV>			</TD>		</TR>	</TABLE></DIV></FORM></BODY></HTML>

Kind regards :)

Link to post
Share on other sites

Visual Basic is a Microsoft product. It works in Microsoft products. Firefox, Safari, Opera, Konquerer, etc., are not Microsoft products.Javascript is universal.Fortunately, your script looks like it could be converted in 20 minutes or so.

Link to post
Share on other sites
Visual Basic is a Microsoft product. It works in Microsoft products. Firefox, Safari, Opera, Konquerer, etc., are not Microsoft products.Javascript is universal.Fortunately, your script looks like it could be converted in 20 minutes or so.
I wish I knew more about java syntax :)I suppose there hasnt been an einstein who made a vb/java converter :)Well time to learn more about java I think.If by any chance you guys can give me a boost :)
Link to post
Share on other sites
Well time to learn more about java I think.
The first thing you should probably learn is that Java and Javascript are very different. Java is a fully fledged programming language comparable to C/C++, for developing standalone applications. That's definitely not what you want in this case. Javascript on the other hand, looks a little bit like Java on the face of it (hence the name), but is fundamentally completely different. Javascript is used predominately as a client-side web programming language, which is exactly what you're after. Next stop -> w3schools javascript tutorial . Good luck!
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...