Java Script only working on IE
- anoxicblaze
- Born


- Joined: Dec 23, 2008
- Posts: 1
- Status: Offline
I have the following Java in my script which adds variables to fill in the forms Item Cost, Delivery Cost & Total. it works on IE but not on Firefox or on a Mac. Any ideas?
Code: [ Select ]
<script language="JavaScript" type="text/JavaScript">
<!--
function FillTerms(nbr) {
var str = "";
switch(nbr) {
case "2-4-1": {
str = "<div style='font-weight:bold'>2 games of bowling for the price of one</div>"
+ "<ul>"
+ "<li>Offer subject to availability"
+ "<li>Valid all day (day?) to (day?)"
+ "<li>Valid for up to 6 people of any age each purchasing one game of bowling at full tariff rate."
+ "<li>Free and paid for games must be played consecutively."
+ "<li>Voucher not for resale."
+ "<li>Cannot be used in conjunction with any other offer."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
+ "<li>Photocopies are not accepted. "
+ "</ul>";
break;
}
case "2.50 per game": {
str = "<div style='font-weight:bold'>£2.50 per game of bowling</div>"
+ "<ul>"
+ "<li>Offer subject to availability"
+ "<li>Valid all day (day?) to (day?)"
+ "<li>Valid for up to 6 people of any age each paying £2.50 per game of bowling"
+ "<li>Voucher not for resale."
+ "<li>Cannot be used in conjunction with any other offer."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
+ "<li>Photocopies are not accepted"
+ "</ul>";
break;
}
case "2 Games for X pounds": {
str = "<div style='font-weight:bold'>2 games of bowling for £X.00</div>"
+ "<ul>"
+ "<li>Offer subject to availability."
+ "<li>Valid all day Monday to Friday."
+ "<li>Valid for up to 6 people, of any age, each purchasing 2 game of bowling for £X."
+ "<li>Voucher not for resale."
+ "<li>Cannot be used in conjunction with any other offer."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
+ "<li>Photocopies are not accepted."
+ "</ul>";
break;
}
case "50p off food": {
str = "<div style='font-weight:bold'>50p off Burger and Fries</div>"
+ "<ul>"
+ "<li>Offer subject to availability."
+ "<li>Valid all day Monday to Friday."
+ "<li>Voucher not for resale."
+ "<li>No change given and no cash value."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays)."
+ "<li>Photocopies are not accepted."
+ "</ul>";
break;
}
case "50p off fruitshoot": {
str = "<div style='font-weight:bold'>50p off any fruit shoot (including H2O)</div>"
+ "<ul>"
+ "<li>Offer subject to availability."
+ "<li>Valid all day Monday - Friday."
+ "<li>Voucher not for resale."
+ "<li>Voucher has no cash value."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
+ "<li>Photocopies are not accepted."
+ "</ul>";
break;
}
case "Free tea or coffee": {
str = "<div style='font-weight:bold'>One free cup of tea or coffee</div>"
+ "<ul>"
+ "<li>One FREE cup of tea of coffee."
+ "<li>Offer subject to availability."
+ "<li>Valid all day Monday to Friday."
+ "<li>Voucher not for resale."
+ "<li>Voucher has no cash value."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
+ "<li>Photocopies are not accepted."
+ "</ul>";
break;
}
case "Free party place": {
str = "<div style='font-weight:bold'>Free Birthday party place</div>"
+ "<ul>"
+ "<li>Birthday Child goes free when booking a birthday party. Minimum of 12 in party."
+ "<li>Offer subject to availability."
+ "<li>Offer available for any booking made before XX date."
+ "<li>Voucher has no cash value."
+ "<li>Voucher not for resale."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays)."
+ "<li>Photocopies are not accepted"
+ "</ul>";
break;
}
case "Organiser goes free": {
str = "<div style='font-weight:bold'>Party organiser goes free</div>"
+ "<ul>"
+ "<li>Party organiser goes free when you book our 'Game for a Party' package for 10 or more."
+ "<li>Offer subject to availability."
+ "<li>Voucher not for resale."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
+ "<li>Photocopies are not accepted."
+ "</ul>";
break;
}
default: {
break;
}
}
document.getElementById("tdTerms").innerHTML = str;
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function validate()
{
flag=true;
if (document.getElementById('Artwork_no1').value==0)
{
alert ("please select Artwork Number");
document.getElementById('Artwork_no1').focus();
flag=false
return flag;
}
if (document.getElementById('Custom_artwork').value==0)
{
alert ("do you require custom artwork? please select");
document.getElementById('Custom_artwork').focus();
flag=false
return flag;
}
if (document.getElementById('Unit_no').selectedIndex==0)
{
alert ("please select Unit No");
flag=false
return flag;
}
if (document.getElementById('Purchase_order').value=="")
{
alert ("please attach your purchase order");
document.getElementById('Purchase_order').focus();
flag=false
return flag;
}
if (document.getElementById('Purchase_no').value=="")
{
alert ("please enter purchase no");
document.getElementById('Purchase_no').focus();
flag=false
return flag;
}
if (document.getElementById('name').value=="")
{
alert ("please enter your name");
document.getElementById('name').focus();
flag=false
return flag;
}
if (document.getElementById('email').value=="")
{
alert ("please enter email address");
document.getElementById('email').focus();
flag=false
return flag;
}
}
//-->
</script>
<script>
<!--
function calctotal()
{
var total=0;
customise=document.getElementById('Custom_artwork').value;
tickets=document.getElementById('Order1_tickets').value;
Leaflets=document.getElementById('Order1_leaflets').value;
posters1=document.getElementById('Order1_posters').value;
posters2=document.getElementById('Order1_posters2').value;
lightbox=document.getElementById('Order1_lightboxes').value;
correx=document.getElementById('Order1_correxboards').value;
runners=document.getElementById('Order1_runners').value
if (customise=="")
customise=0
if (tickets=="")
tickets=0
if (Leaflets=="")
Leaflets=0
if (posters1=="")
posters1=0
if (posters2=="")
posters2=0
if (lightbox=="")
lightbox=0
if (correx=="")
correx=0
if (runners=="")
runners=0
total=parseFloat(customise)+parseFloat(tickets)+parseFloat(Leaflets)+parseFloat(posters1)+parseFloat(posters2)+parseFloat(lightbox)+parseFloat(correx)+parseFloat(runners);
document.getElementById('Total').value=total ;
}
function calcdeliverytotal()
{
var total=0;
customise=document.getElementById('Custom_artwork').value.split("^");
tickets=document.getElementById('Order1_tickets').value.split("^");
Leaflets=document.getElementById('Order1_leaflets').value.split("^");
posters1=document.getElementById('Order1_posters').value.split("^");
posters2=document.getElementById('Order1_posters2').value.split("^");
lightbox=document.getElementById('Order1_lightboxes').value.split("^");
correx=document.getElementById('Order1_correxboards').value.split("^");
runners=document.getElementById('Order1_runners').value.split("^")
if (customise[2]==undefined)
customise[2]=0
if (tickets[2]==undefined)
tickets[2]=0
if (Leaflets[2]==undefined)
Leaflets[2]=0
if (posters1[2]==undefined)
posters1[2]=0
if (posters2[2]==undefined)
posters2[2]=0
if (lightbox[2]==undefined)
lightbox[2]=0
if (correx[2]==undefined)
correx[2]=0
if (runners[2]==undefined)
runners[2]=0
total=parseFloat(customise[2])+parseFloat(tickets[2])+parseFloat(Leaflets[2])+parseFloat(posters1[2])+parseFloat(posters2[2])+parseFloat(lightbox[2])+parseFloat(correx[2])+parseFloat(runners[2]);
document.getElementById('deliverycost').value=total ;
document.getElementById('totalcost').value=parseFloat(document.getElementById('deliverycost').value)+parseFloat(document.getElementById('Total').value)
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<!--
function FillTerms(nbr) {
var str = "";
switch(nbr) {
case "2-4-1": {
str = "<div style='font-weight:bold'>2 games of bowling for the price of one</div>"
+ "<ul>"
+ "<li>Offer subject to availability"
+ "<li>Valid all day (day?) to (day?)"
+ "<li>Valid for up to 6 people of any age each purchasing one game of bowling at full tariff rate."
+ "<li>Free and paid for games must be played consecutively."
+ "<li>Voucher not for resale."
+ "<li>Cannot be used in conjunction with any other offer."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
+ "<li>Photocopies are not accepted. "
+ "</ul>";
break;
}
case "2.50 per game": {
str = "<div style='font-weight:bold'>£2.50 per game of bowling</div>"
+ "<ul>"
+ "<li>Offer subject to availability"
+ "<li>Valid all day (day?) to (day?)"
+ "<li>Valid for up to 6 people of any age each paying £2.50 per game of bowling"
+ "<li>Voucher not for resale."
+ "<li>Cannot be used in conjunction with any other offer."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
+ "<li>Photocopies are not accepted"
+ "</ul>";
break;
}
case "2 Games for X pounds": {
str = "<div style='font-weight:bold'>2 games of bowling for £X.00</div>"
+ "<ul>"
+ "<li>Offer subject to availability."
+ "<li>Valid all day Monday to Friday."
+ "<li>Valid for up to 6 people, of any age, each purchasing 2 game of bowling for £X."
+ "<li>Voucher not for resale."
+ "<li>Cannot be used in conjunction with any other offer."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
+ "<li>Photocopies are not accepted."
+ "</ul>";
break;
}
case "50p off food": {
str = "<div style='font-weight:bold'>50p off Burger and Fries</div>"
+ "<ul>"
+ "<li>Offer subject to availability."
+ "<li>Valid all day Monday to Friday."
+ "<li>Voucher not for resale."
+ "<li>No change given and no cash value."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays)."
+ "<li>Photocopies are not accepted."
+ "</ul>";
break;
}
case "50p off fruitshoot": {
str = "<div style='font-weight:bold'>50p off any fruit shoot (including H2O)</div>"
+ "<ul>"
+ "<li>Offer subject to availability."
+ "<li>Valid all day Monday - Friday."
+ "<li>Voucher not for resale."
+ "<li>Voucher has no cash value."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
+ "<li>Photocopies are not accepted."
+ "</ul>";
break;
}
case "Free tea or coffee": {
str = "<div style='font-weight:bold'>One free cup of tea or coffee</div>"
+ "<ul>"
+ "<li>One FREE cup of tea of coffee."
+ "<li>Offer subject to availability."
+ "<li>Valid all day Monday to Friday."
+ "<li>Voucher not for resale."
+ "<li>Voucher has no cash value."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
+ "<li>Photocopies are not accepted."
+ "</ul>";
break;
}
case "Free party place": {
str = "<div style='font-weight:bold'>Free Birthday party place</div>"
+ "<ul>"
+ "<li>Birthday Child goes free when booking a birthday party. Minimum of 12 in party."
+ "<li>Offer subject to availability."
+ "<li>Offer available for any booking made before XX date."
+ "<li>Voucher has no cash value."
+ "<li>Voucher not for resale."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays)."
+ "<li>Photocopies are not accepted"
+ "</ul>";
break;
}
case "Organiser goes free": {
str = "<div style='font-weight:bold'>Party organiser goes free</div>"
+ "<ul>"
+ "<li>Party organiser goes free when you book our 'Game for a Party' package for 10 or more."
+ "<li>Offer subject to availability."
+ "<li>Voucher not for resale."
+ "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
+ "<li>Photocopies are not accepted."
+ "</ul>";
break;
}
default: {
break;
}
}
document.getElementById("tdTerms").innerHTML = str;
}
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function validate()
{
flag=true;
if (document.getElementById('Artwork_no1').value==0)
{
alert ("please select Artwork Number");
document.getElementById('Artwork_no1').focus();
flag=false
return flag;
}
if (document.getElementById('Custom_artwork').value==0)
{
alert ("do you require custom artwork? please select");
document.getElementById('Custom_artwork').focus();
flag=false
return flag;
}
if (document.getElementById('Unit_no').selectedIndex==0)
{
alert ("please select Unit No");
flag=false
return flag;
}
if (document.getElementById('Purchase_order').value=="")
{
alert ("please attach your purchase order");
document.getElementById('Purchase_order').focus();
flag=false
return flag;
}
if (document.getElementById('Purchase_no').value=="")
{
alert ("please enter purchase no");
document.getElementById('Purchase_no').focus();
flag=false
return flag;
}
if (document.getElementById('name').value=="")
{
alert ("please enter your name");
document.getElementById('name').focus();
flag=false
return flag;
}
if (document.getElementById('email').value=="")
{
alert ("please enter email address");
document.getElementById('email').focus();
flag=false
return flag;
}
}
//-->
</script>
<script>
<!--
function calctotal()
{
var total=0;
customise=document.getElementById('Custom_artwork').value;
tickets=document.getElementById('Order1_tickets').value;
Leaflets=document.getElementById('Order1_leaflets').value;
posters1=document.getElementById('Order1_posters').value;
posters2=document.getElementById('Order1_posters2').value;
lightbox=document.getElementById('Order1_lightboxes').value;
correx=document.getElementById('Order1_correxboards').value;
runners=document.getElementById('Order1_runners').value
if (customise=="")
customise=0
if (tickets=="")
tickets=0
if (Leaflets=="")
Leaflets=0
if (posters1=="")
posters1=0
if (posters2=="")
posters2=0
if (lightbox=="")
lightbox=0
if (correx=="")
correx=0
if (runners=="")
runners=0
total=parseFloat(customise)+parseFloat(tickets)+parseFloat(Leaflets)+parseFloat(posters1)+parseFloat(posters2)+parseFloat(lightbox)+parseFloat(correx)+parseFloat(runners);
document.getElementById('Total').value=total ;
}
function calcdeliverytotal()
{
var total=0;
customise=document.getElementById('Custom_artwork').value.split("^");
tickets=document.getElementById('Order1_tickets').value.split("^");
Leaflets=document.getElementById('Order1_leaflets').value.split("^");
posters1=document.getElementById('Order1_posters').value.split("^");
posters2=document.getElementById('Order1_posters2').value.split("^");
lightbox=document.getElementById('Order1_lightboxes').value.split("^");
correx=document.getElementById('Order1_correxboards').value.split("^");
runners=document.getElementById('Order1_runners').value.split("^")
if (customise[2]==undefined)
customise[2]=0
if (tickets[2]==undefined)
tickets[2]=0
if (Leaflets[2]==undefined)
Leaflets[2]=0
if (posters1[2]==undefined)
posters1[2]=0
if (posters2[2]==undefined)
posters2[2]=0
if (lightbox[2]==undefined)
lightbox[2]=0
if (correx[2]==undefined)
correx[2]=0
if (runners[2]==undefined)
runners[2]=0
total=parseFloat(customise[2])+parseFloat(tickets[2])+parseFloat(Leaflets[2])+parseFloat(posters1[2])+parseFloat(posters2[2])+parseFloat(lightbox[2])+parseFloat(correx[2])+parseFloat(runners[2]);
document.getElementById('deliverycost').value=total ;
document.getElementById('totalcost').value=parseFloat(document.getElementById('deliverycost').value)+parseFloat(document.getElementById('Total').value)
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
- <script language="JavaScript" type="text/JavaScript">
- <!--
- function FillTerms(nbr) {
- var str = "";
- switch(nbr) {
- case "2-4-1": {
- str = "<div style='font-weight:bold'>2 games of bowling for the price of one</div>"
- + "<ul>"
- + "<li>Offer subject to availability"
- + "<li>Valid all day (day?) to (day?)"
- + "<li>Valid for up to 6 people of any age each purchasing one game of bowling at full tariff rate."
- + "<li>Free and paid for games must be played consecutively."
- + "<li>Voucher not for resale."
- + "<li>Cannot be used in conjunction with any other offer."
- + "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
- + "<li>Photocopies are not accepted. "
- + "</ul>";
- break;
- }
- case "2.50 per game": {
- str = "<div style='font-weight:bold'>£2.50 per game of bowling</div>"
- + "<ul>"
- + "<li>Offer subject to availability"
- + "<li>Valid all day (day?) to (day?)"
- + "<li>Valid for up to 6 people of any age each paying £2.50 per game of bowling"
- + "<li>Voucher not for resale."
- + "<li>Cannot be used in conjunction with any other offer."
- + "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
- + "<li>Photocopies are not accepted"
- + "</ul>";
- break;
- }
- case "2 Games for X pounds": {
- str = "<div style='font-weight:bold'>2 games of bowling for £X.00</div>"
- + "<ul>"
- + "<li>Offer subject to availability."
- + "<li>Valid all day Monday to Friday."
- + "<li>Valid for up to 6 people, of any age, each purchasing 2 game of bowling for £X."
- + "<li>Voucher not for resale."
- + "<li>Cannot be used in conjunction with any other offer."
- + "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
- + "<li>Photocopies are not accepted."
- + "</ul>";
- break;
- }
- case "50p off food": {
- str = "<div style='font-weight:bold'>50p off Burger and Fries</div>"
- + "<ul>"
- + "<li>Offer subject to availability."
- + "<li>Valid all day Monday to Friday."
- + "<li>Voucher not for resale."
- + "<li>No change given and no cash value."
- + "<li>Offer ends XX.XX.XX (excluding bank holidays)."
- + "<li>Photocopies are not accepted."
- + "</ul>";
- break;
- }
- case "50p off fruitshoot": {
- str = "<div style='font-weight:bold'>50p off any fruit shoot (including H2O)</div>"
- + "<ul>"
- + "<li>Offer subject to availability."
- + "<li>Valid all day Monday - Friday."
- + "<li>Voucher not for resale."
- + "<li>Voucher has no cash value."
- + "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
- + "<li>Photocopies are not accepted."
- + "</ul>";
- break;
- }
- case "Free tea or coffee": {
- str = "<div style='font-weight:bold'>One free cup of tea or coffee</div>"
- + "<ul>"
- + "<li>One FREE cup of tea of coffee."
- + "<li>Offer subject to availability."
- + "<li>Valid all day Monday to Friday."
- + "<li>Voucher not for resale."
- + "<li>Voucher has no cash value."
- + "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
- + "<li>Photocopies are not accepted."
- + "</ul>";
- break;
- }
- case "Free party place": {
- str = "<div style='font-weight:bold'>Free Birthday party place</div>"
- + "<ul>"
- + "<li>Birthday Child goes free when booking a birthday party. Minimum of 12 in party."
- + "<li>Offer subject to availability."
- + "<li>Offer available for any booking made before XX date."
- + "<li>Voucher has no cash value."
- + "<li>Voucher not for resale."
- + "<li>Offer ends XX.XX.XX (excluding bank holidays)."
- + "<li>Photocopies are not accepted"
- + "</ul>";
- break;
- }
- case "Organiser goes free": {
- str = "<div style='font-weight:bold'>Party organiser goes free</div>"
- + "<ul>"
- + "<li>Party organiser goes free when you book our 'Game for a Party' package for 10 or more."
- + "<li>Offer subject to availability."
- + "<li>Voucher not for resale."
- + "<li>Offer ends XX.XX.XX (excluding bank holidays?)."
- + "<li>Photocopies are not accepted."
- + "</ul>";
- break;
- }
- default: {
- break;
- }
- }
- document.getElementById("tdTerms").innerHTML = str;
- }
- function MM_reloadPage(init) { //reloads the window if Nav4 resized
- if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
- document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
- else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
- }
- MM_reloadPage(true);
- function validate()
- {
- flag=true;
- if (document.getElementById('Artwork_no1').value==0)
- {
- alert ("please select Artwork Number");
- document.getElementById('Artwork_no1').focus();
- flag=false
- return flag;
- }
- if (document.getElementById('Custom_artwork').value==0)
- {
- alert ("do you require custom artwork? please select");
- document.getElementById('Custom_artwork').focus();
- flag=false
- return flag;
- }
- if (document.getElementById('Unit_no').selectedIndex==0)
- {
- alert ("please select Unit No");
- flag=false
- return flag;
- }
- if (document.getElementById('Purchase_order').value=="")
- {
- alert ("please attach your purchase order");
- document.getElementById('Purchase_order').focus();
- flag=false
- return flag;
- }
- if (document.getElementById('Purchase_no').value=="")
- {
- alert ("please enter purchase no");
- document.getElementById('Purchase_no').focus();
- flag=false
- return flag;
- }
- if (document.getElementById('name').value=="")
- {
- alert ("please enter your name");
- document.getElementById('name').focus();
- flag=false
- return flag;
- }
- if (document.getElementById('email').value=="")
- {
- alert ("please enter email address");
- document.getElementById('email').focus();
- flag=false
- return flag;
- }
- }
- //-->
- </script>
- <script>
- <!--
- function calctotal()
- {
- var total=0;
- customise=document.getElementById('Custom_artwork').value;
- tickets=document.getElementById('Order1_tickets').value;
- Leaflets=document.getElementById('Order1_leaflets').value;
- posters1=document.getElementById('Order1_posters').value;
- posters2=document.getElementById('Order1_posters2').value;
- lightbox=document.getElementById('Order1_lightboxes').value;
- correx=document.getElementById('Order1_correxboards').value;
- runners=document.getElementById('Order1_runners').value
- if (customise=="")
- customise=0
- if (tickets=="")
- tickets=0
- if (Leaflets=="")
- Leaflets=0
- if (posters1=="")
- posters1=0
- if (posters2=="")
- posters2=0
- if (lightbox=="")
- lightbox=0
- if (correx=="")
- correx=0
- if (runners=="")
- runners=0
- total=parseFloat(customise)+parseFloat(tickets)+parseFloat(Leaflets)+parseFloat(posters1)+parseFloat(posters2)+parseFloat(lightbox)+parseFloat(correx)+parseFloat(runners);
- document.getElementById('Total').value=total ;
- }
- function calcdeliverytotal()
- {
- var total=0;
- customise=document.getElementById('Custom_artwork').value.split("^");
- tickets=document.getElementById('Order1_tickets').value.split("^");
- Leaflets=document.getElementById('Order1_leaflets').value.split("^");
- posters1=document.getElementById('Order1_posters').value.split("^");
- posters2=document.getElementById('Order1_posters2').value.split("^");
- lightbox=document.getElementById('Order1_lightboxes').value.split("^");
- correx=document.getElementById('Order1_correxboards').value.split("^");
- runners=document.getElementById('Order1_runners').value.split("^")
- if (customise[2]==undefined)
- customise[2]=0
- if (tickets[2]==undefined)
- tickets[2]=0
- if (Leaflets[2]==undefined)
- Leaflets[2]=0
- if (posters1[2]==undefined)
- posters1[2]=0
- if (posters2[2]==undefined)
- posters2[2]=0
- if (lightbox[2]==undefined)
- lightbox[2]=0
- if (correx[2]==undefined)
- correx[2]=0
- if (runners[2]==undefined)
- runners[2]=0
- total=parseFloat(customise[2])+parseFloat(tickets[2])+parseFloat(Leaflets[2])+parseFloat(posters1[2])+parseFloat(posters2[2])+parseFloat(lightbox[2])+parseFloat(correx[2])+parseFloat(runners[2]);
- document.getElementById('deliverycost').value=total ;
- document.getElementById('totalcost').value=parseFloat(document.getElementById('deliverycost').value)+parseFloat(document.getElementById('Total').value)
- }
- function MM_swapImgRestore() { //v3.0
- var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
- }
- function MM_preloadImages() { //v3.0
- var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
- var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
- if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
- }
- function MM_findObj(n, d) { //v4.01
- var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
- d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
- if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
- for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
- if(!x && d.getElementById) x=d.getElementById(n); return x;
- }
- function MM_swapImage() { //v3.0
- var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
- if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
- }
- //-->
- </script>
- Anonymous
- Bot


- Joined: 25 Feb 2008
- Posts: ?
- Loc: Ozzuland
- Status: Online
December 23rd, 2008, 5:11 am
Page 1 of 1
To Reply to this topic you need to LOGIN or REGISTER. It is free.
Post Information
- Total Posts in this topic: 1 post
- Users browsing this forum: No registered users and 266 guests
- You cannot post new topics in this forum
- You cannot reply to topics in this forum
- You cannot edit your posts in this forum
- You cannot delete your posts in this forum
- You cannot post attachments in this forum
