PDA

View Full Version : Norman's "add to basket" using Netscape


edmorey
20-Oct-2003, 10:16 AM
Hi

I'm running through acceptance testing on a new site (http://www.animal-usa.com/index.html) and that means testing with Netscape and Macs.

I've only found one thing that's not working and that's Norman's excellent popup window "add to basket" workaround which doesn't work on Netscape because the action of the form is blank and Netscape can't handle that - while IE can.

Has anyone a solution to this?

Cheers
Ed

NormanRouxel
20-Oct-2003, 04:50 PM
Fixed it. At least for IE6, NN7 and Opera 7.11 on Windows XP here. Someone try it on a Mac please. Attached is a new ReadMe. The only thing that's changed is the doit() JavaScript function in Test_ExtendedInfo.html.

Norman

Now if only someone will fix my lousy Turkish phone line. I'm sending this at 14.4Kb :mad:

edmorey
20-Oct-2003, 07:00 PM
Thanks Norman

That 500ms stall on the window.close did the trick - what was the problem that this overcame?

Ed

NormanRouxel
20-Oct-2003, 09:57 PM
There were 2 things that Netscape couldn't handle.

1. It needed document.forms.popform to refer to the form named "popform" on the popup. I had just popform (and IE was happy with this). Having fixed this there were no more JavaScript errors but

2. I had window.close; return true; to exit the doit() function and allow the form to submit.

Netscape seems to stop interpreting the JavaScript after the window.close so the form would close but nothing get submitted on NN. If I chaged it to "return true; window.close" then the form did get submitted but the popup window never closed (in any flavour browser).

The solution was to defer the close by half a second and return true so that both browsers were happy.

Luckily Netscape has a much better JavaScript debugging console than IE so it helped me find the buglets.

Norman

edmorey
20-Oct-2003, 11:20 PM
Well I can't pretend to understand all of what you've said - but thank you in any case, and for the other great bits & bobs I've used from your site. It's very much appreciated.

Ed

Josie
21-Oct-2003, 11:03 AM
Thanks for this update Norman, we will be trying it on our site. Up until now we've had the code perform a navigator check and only show the button if Microsoft Explorer. We've had a look at (http://www.animal-usa.com/index.html) using Netscape 4.7 and it seems to work fine.

Josie
:D