473,320 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Works in IE but ont Netscape

This script works with IE but not Netscape anyone know what I am doing
wrong? If so could you help me out I am at a lost?

Thanks in advance.

The error is as follow

Error: pen0 has no properties
Line: 73

function GetPrice(){
var pen0, smartview0, smartview1, smartview2, cashscan0, cashscan1,
cashscan2, cashscan3, cashscan4, MSB0, MSB1, penv, pen2v, pen3v, pen4v,
pen5v, pen6v, pen7v, pen8v, pen9v, MSB0v, MSB1v, total, price, price1;
if (document.getElementById) {
price = document.getElementById('price');
price1 = document.getElementById('price1');
pen0 = document.getElementById('pen0');
smartview0 = document.getElementById('smartview0');
smartview1 = document.getElementById('smartview1');
smartview2 = document.getElementById('smartview2');
cashscan0 = document.getElementById('cashscan0');
cashscan1 = document.getElementById('cashscan1');
cashscan2 = document.getElementById('cashscan2');
cashscan3 = document.getElementById('cashscan3');
cashscan4 = document.getElementById('cashscan4');
MSB0 = document.getElementById('MSB0');
MSB1 = document.getElementById('MSB1');
pen0v = document.getElementById('pen0v');
smartview0v = document.getElementById('smartview0v');
smartview1v = document.getElementById('smartview1v');
smartview2v = document.getElementById('smartview2v');
cashscan0v = document.getElementById('cashscan0v');
cashscan1v = document.getElementById('cashscan1v');
cashscan2v = document.getElementById('cashscan2v');
cashscan3v = document.getElementById('cashscan3v');
cashscan4v = document.getElementById('cashscan4v');
MSB0v = document.getElementById('MSB0v');
MSB1v = document.getElementById('MSB1v');
total = document.getElementById('total');
}
else {
PurchasePen = document.PurchasePen;
price = PurchasePen.price;
price1 = PurchasePen.price1;
pen0 = PurchasePen.pen[0];
smartview0 = PurchasePen.smartview[0];
smartview1 = PurchasePen.smartview[1];
smartview2 = PurchasePen.smartview[2];
cashscan0 = PurchasePen.cashscan[0];
cashscan1 = PurchasePen.cashscan[1];
cashscan2 = PurchasePen.cashscan[2];
cashscan3 = PurchasePen.cashscan[3];
cashscan4 = PurchasePen.cashscan[4];
MSB0 = PurchasePen.MSB[0];
MSB1 = PurchasePen.MSB[1];
pen0v = PurchasePen.pen0v;
smartview0v = PurchasePen.smartview0v;
smartview1v = PurchasePen.smartview1v;
smartview2v = PurchasePen.smartview2v;
cashscan0v = PurchasePen.cashscan0v;
cashscan1v = PurchasePen.cashscan1v;
cashscan2v = PurchasePen.cashscan2v;
cashscan3v = PurchasePen.cashscan3v;
cashscan4v = PurchasePen.cashscan4v;
MSB0v = PurchasePen.MSB0v;
MSB1v = PurchasePen.MSB1v;
total = PurchasePen.total;
}
{
pen0v = 0;
smartview0v = 0;
smartview1v = 0;
smartview2v = 0;
cashscan0v = 0;
cashscan1v = 0;
cashscan2v = 0;
cashscan3v = 0;
cashscan4v = 0;
MSB0v = 0;
MSB1v = 0;
total = 0;
}

if (pen0.value == "") {
// Do Nothing
}
else if (pen0.value < 3) {
alert("There is a minimum purchase of 3 pens")
pen0.value = ""}
else if (pen0.value = 3) {
pen0v = (pen0.value * 7.95)}
else if (pen0.value > 3 && pen0.value < 11) {
pen0v = (pen0.value * 6.95)}
else if (pen0.value > 10 && pen0.value < 24) {
pen0v = (pen0.value * 5.95)}
else if (pen0.value > 23) {
pen0v = (pen0.value * 4.98)}

if (smartview0.value < 5) {
smartview0v = (smartview0.value * 34.95 )}
else if (smartview0.value > 4) {
smartview0v = (smartview0.value * 31.45 )}

{smartview2v = (smartview2.value * 30.00 )}

if (cashscan0.value < 3) {
cashscan0v = (cashscan0.value * 250.00)}
else if (cashscan0.value > 2 && cashscan0.value < 6) {
cashscan0v = (cashscan0.value * 225.00 )}
else if (cashscan0.value > 5) {
cashscan0v = (cashscan0.value * 205.00 )}

if (cashscan1.value < 3) {
cashscan1v = (cashscan1.value * 595.00)}
else if (cashscan1.value > 2 && cashscan1.value < 6) {
cashscan1v = (cashscan1.value * 525.00 )}
else if (cashscan1.value > 5) {
cashscan1v = (cashscan1.value * 495.00 )}

if (cashscan2.value < 3) {
cashscan2v = (cashscan2.value * 1750.00)}
else if (cashscan2.value > 2 && cashscan2.value < 6) {
cashscan2v = (cashscan2.value * 1650.00 )}
else if (cashscan2.value > 5) {
cashscan2v = (cashscan2.value * 1500.00 )}

if (cashscan3.value < 3) {
cashscan3v = (cashscan3.value * 995.00)}
else if (cashscan3.value > 2 && cashscan3.value < 6) {
cashscan3v = (cashscan3.value * 900.00 )}
else if (cashscan3.value > 5) {
cashscan3v = (cashscan3.value * 815.00 )}

if (cashscan4.value < 3) {
cashscan4v = (cashscan4.value * 795.00)}
else if (cashscan4.value > 2 && cashscan4.value < 6) {
cashscan4v = (cashscan4.value * 705.00 )}
else if (cashscan4.value > 5) {
cashscan4v = (cashscan4.value * 650.00 )}

if (MSB0.value < 3) {
MSB0v = (MSB0.value * 795.00)}
else if (MSB0.value > 2 && MSB0.value < 6) {
MSB0v = (MSB0.value * 705.00 )}
else if (MSB0.value > 5) {
MSB0v = (MSB0.value * 650.00 )}
if (MSB1.value < 3) {
MSB1v = (MSB1.value * 950.00)}
else if (MSB1.value > 2 && MSB1.value < 6) {
MSB1v = (MSB1.value * 900.00 )}
else if (MSB1.value > 5) {
MSB1v = (MSB1.value * 850.00 )}

{total = (pen0v + smartview0v + smartview1v + smartview2v + cashscan0v +
cashscan1v + cashscan2v + cashscan3v + cashscan4v + MSB0v + MSB1v)}

{
price.value = total.toFixed(2)
price1.value = total.toFixed(2)
}

}
Jul 23 '05 #1
7 1109
Ivo
"Rick" wrote
This script works with IE but not Netscape anyone know what I am doing
wrong? If so could you help me out I am at a lost?

Thanks in advance.

The error is as follow

Error: pen0 has no properties
Line: 73

function GetPrice(){
var pen0, smartview0, smartview1, smartview2, cashscan0, cashscan1,
cashscan2, cashscan3, cashscan4, MSB0, MSB1, penv, pen2v, pen3v, pen4v,
pen5v, pen6v, pen7v, pen8v, pen9v, MSB0v, MSB1v, total, price, price1;
if (document.getElementById) {
price = document.getElementById('price');
price1 = document.getElementById('price1');
pen0 = document.getElementById('pen0');

<snip endless code>

Apparently there is no element with id "pen0". For further assistance, an
URL would probably be more helpful than more code. It 's hard to tell which
line is 73 and when the error occurs. What browsers are you testing in?
--Iv
Jul 23 '05 #2
"Ivo" <no@thank.you> wrote in message
news:41********************@news.wanadoo.nl...

Apparently there is no element with id "pen0". For further assistance, an
URL would probably be more helpful than more code. It 's hard to tell which line is 73 and when the error occurs. What browsers are you testing in?
--Iv

Thanks for your reply!!!

http://208.247.35.233/orderForm.html
Jul 23 '05 #3
pan

"Rick" <ri**@di-wave.com> wrote in message
news:RX*****************@twister.socal.rr.com...
"Ivo" <no@thank.you> wrote in message
news:41********************@news.wanadoo.nl...

Apparently there is no element with id "pen0". For further assistance, an URL would probably be more helpful than more code. It 's hard to tell

which
line is 73 and when the error occurs. What browsers are you testing in?
--Iv

Thanks for your reply!!!

http://208.247.35.233/orderForm.html

What Ivo said - you have name="pen0" but no id="pen0"

simple fix
Jul 23 '05 #4
Lee
Rick said:

"Ivo" <no@thank.you> wrote in message
news:41********************@news.wanadoo.nl...

Apparently there is no element with id "pen0". For further assistance, an
URL would probably be more helpful than more code. It 's hard to tell

which
line is 73 and when the error occurs. What browsers are you testing in?
--Iv

Thanks for your reply!!!

http://208.247.35.233/orderForm.html


As Ivo said, you don't have an element with the id "pen0".
You have one named "pen0", but its id is "pen02".

<input name="pen0" id="pen02"

Jul 23 '05 #5
>

What Ivo said - you have name="pen0" but no id="pen0"

simple fix

Man do I fell dumb..... Thanks you guys!!!!

Jul 23 '05 #6
Rick wrote:
This script works with IE but not Netscape anyone know what I am doing
wrong? If so could you help me out I am at a lost?

Thanks in advance.

The error is as follow

Error: pen0 has no properties
Line: 73


else if (pen0.value = 3) {//This is probably not what you want.

else if (pen0.value == 3) {//This probably what you want.

Your script is unnecessarly bloated, and the Number.toFixed() method
works only on newer browsers(those that implement j(ava)script 1.5 )
Mick
Jul 23 '05 #7

"Mick White" <mw******@BOGUSrochester.rr.com> wrote in message
news:7Z*********************@twister.nyroc.rr.com. ..
Rick wrote:
This script works with IE but not Netscape anyone know what I am doing
wrong? If so could you help me out I am at a lost?

Thanks in advance.

The error is as follow

Error: pen0 has no properties
Line: 73


else if (pen0.value = 3) {//This is probably not what you want.

else if (pen0.value == 3) {//This probably what you want.

Your script is unnecessarly bloated, and the Number.toFixed() method
works only on newer browsers(those that implement j(ava)script 1.5 )
Mick

Yes I noticed the = should have been ==

Thanks very much for you help!!!
Jul 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: David | last post by:
On every web browser except Safari, this website works great. (Well, by "every" I mean Mozilla, Netscape, and Internet Explorer, for Mac and Windows). The site is: http://www.ruleofthirds.com ...
2
by: Moon | last post by:
Seems I still haven't got the hang of all those window generating code in Javascript. I've got a page with about 15 photo thumbnails. When you click on a thumbnail a new window pops up which shows...
10
by: tony kulik | last post by:
This code works fine in ie and opera but not at all in Mozilla. Anybody got a clue as to how to get it right? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <script...
2
by: ASallade | last post by:
Hello, I've scoured my books and the web, but am still daunted, hopefully some of the users in this newsgroup will have advice for my problem. I am not an experienced javascript programmer,...
4
by: Treetop | last post by:
I have code that works in IE but not Netscape 7+. This code allows me to have a list of links that bring up an image and description in an iframe. This works great in IE, however I have users...
5
by: D E | last post by:
Here is the problem. The following script/html code works in IE, not Netscape. The javascript portion produces the text to be dynamically written in the <A HREF="">HEREHEREHERE</A> portion... The...
1
by: viper81 | last post by:
Hello, This script works fine on Iexplorer but on Netscape 7.1 and older it doesn't works. Can someone helps me with this => <form name="frm_order" method="POST"...
4
by: lawrence | last post by:
Can anyone tell me why this code works in Netscape 7.1 but not in IE??? <SCRIPT type='text/javascript'> function makeVisible(nameOfDiv) {...
2
by: John | last post by:
Code is as follows: document.write('<FORM name="horseform">'); document.write(' <SELECT SIZE="1" NAME="horsebrandslist" STYLE="font-size: 8pt">'); document.write(' <OPTION...
28
by: entfred | last post by:
I have the following line of html: &nbsp;&nbsp1234&nbsp;&nbsp;&nbsp;&nbsp;&nbspabc&nbsp;&nbsp;&nbspyow In Internet Explorer 6.0, the columns look ok using the above html: 1234 abcd ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.