View Full Version : Javascript problems in IE7 and IE6

12-22-2010, 11:15 AM

Iam currently working on a project http://www.missciss.nl
It has a webshop included.

On all browsers the whole shop works fine, besides IE7 and IE6.
Normaly i would ignore those 2 browsers, but the client uses the old browsers and want the website to work fine on it.

With both ie7 and ie6 i get Javascript errors when proceeding to step 3 of completing the order.
Just make an order but putting 1 article in the webshop. Fill in your customerdata, just spam it and try to proceed to step 3.
On the 2 browsers mentioned, it wont continue and gives an error.

It seems a problem between prototype and jquery. But my javascript knowledge isnt that great.
All javascript code could be found in the source code.

Does anyone have a suggestion what i could try to the webshop would work on IE7 and IE6?

Thanks in advance.

Sorry for my bad english :)


12-22-2010, 11:58 AM
Firebug is giving an error on the cart page:

document.getElementById("discountrow") is null
Line 238

- which is the line that IE7 complains about as well.

You don't seem to have an element with this id in your code.

12-22-2010, 12:26 PM
Actually the cart (step1) continues on all browsers, so i'll leave it for now :)

The problem lies at step2, when continueing to step3.

12-22-2010, 12:32 PM
I don't see any other difference in behaviour between IE7 and FF. If I fill in login details in both browsers I then get:

"De opgegeven combinatie van gebruikersnaam en wachtwoord was onjuist."

in both FF and IE7.

12-22-2010, 12:34 PM
I think you use the Compatible version of IE8 to preview IE7.
When IE8 is selected, press F12 and select browser IE7. Then you'll get the error i get :)

12-22-2010, 12:45 PM
No, I used native IE7.
I get the same in native IE6 as well.

12-22-2010, 12:57 PM
Ahh, now i get it :)
At step2. Click "Registreer" and fill in some random stuff, email must be an email like test@test.com
Then click "Naar stap 3" and it wont continue on IE7 and IE6.
You'll see an error message in the left bottom of the browser. Thats the javascript thing.

12-22-2010, 01:01 PM
No, still get the same result. No error on that page, just on the checkout page as before.
If you are getting a js error after logging on, what is the error?

12-22-2010, 01:07 PM
This is the error report i get in both ie7 and ie6. And i cant continue to step 3 (select delivery and shipping method).

Foutdetails webpagina

Gebruikersagent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.2; .NET CLR 1.1.4322)
Tijdstempel: Wed, 22 Dec 2010 12:05:27 UTC

Bericht: 'checkout[order][usebillingaddress].1' is leeg of geen object
Regel: 171
Teken: 2
Code: 0
URI: http://www.missciss.nl/action/customer

Bericht: 'elements.checkout[order][usebillingaddress].0' is leeg of geen object
Regel: 243
Teken: 2
Code: 0
URI: http://www.missciss.nl/action/customer

Bericht: 'elements.checkout[order][shippingname]' is leeg of geen object
Regel: 257
Teken: 2
Code: 0
URI: http://www.missciss.nl/action/customer

I'll try to translate to english:
Message: 'elements.checkout[order][shippingname]' is empty of not an object

Any ideas?

12-22-2010, 01:07 PM
Ah sorry, you didn't say click Register before, I've been clicking Login.

Both Firefox and IE7 give a similar error:

document.forms.customer.elements['checkout[order][usebillingaddress]'] is undefined
Line 171

Edit: You have this element commented out at line 403.

12-22-2010, 01:14 PM
I know, the customers wont be able to select a different address for delivery.
So the javascript is validating fields that arent available.
But Firefox will continue, IE7 will stop at the error so you cant complete the order.

12-22-2010, 01:17 PM
Seems like you need to remove the functions that call those elements from your javascript then.

12-22-2010, 01:20 PM
is it possible to exclude some code for IE7 and IE6 only?

12-22-2010, 01:31 PM
I suppose you could do this with conditional comments (messy), but I don't see why you need to - those functions are not required so why not just remove them?

12-22-2010, 01:34 PM
i'll give it a try by commenting first, to see if it works. i'll let you know.
thanks for now :)

12-22-2010, 03:32 PM
Whatever i try, i still keep getting errors about items that are empty or not an object.

I removed all the commented script parts and i get the following error when the form wants to be send: Customer is empty or not an object.
Its missing data.

Now my Javascript knownledge is so low that its hard for me to detect what is could be :)

Any other suggestions?

12-22-2010, 04:25 PM
I'm out of ideas, sorry. Although you have commented out a few lines, there are still many that refer to elements that you have removed from the page, so you're still going to get errors. However, if I've understood the logic of the form, it's copying data from the customer record to the delivery address record anyway, so simply removing all those elements may cause further problems down the line.

I've just tried reinstating all the removed elements, but the form will still not submit in IE7 for me.

You might ask a mod to move this over to the main javascript forum (rather than the js framework forum as now) where you may well get more useful help. I'm pretty sure a prototype/JQuery conflict is not the cause of this....

12-23-2010, 08:59 AM
Thank you,
How do i request a "mod"?