/    Sign up×
Community /Pin to ProfileBookmark

Corrupt? javascript

Gentlemen:

At:
[url]http://www.westcanlogistics.com[/url] – on the “shipper” and “carrier” pages, I have two small – “quickie” email reply forms “pop-up”. However I get an error message that says in the shipper.htm page that on line 21 there is an error – I do not understand java – merely used it from someone else – so I do not know how to ocrrect this small error.

Also on the “carrier” page – it says there is an error on line 21 as well – which is reasonable as I used the same script for both.

Anyone interested in peeking at these and ytelling me what I have done – or not done – and help me fix them??

TIA,

Ted

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@SulJan 20.2004 — I don't see a link to any pop-up page...

-oops sorry, it was my popup blocker

Seems to be working fine with me...
Copy linkTweet thisAlerts:
@PittimannJan 20.2004 — Hi!

You have several things on that page, which are not ok:

first you call quickship.htm onload (this is loaded with the error),

Then you call quicktrip.htm (this is loaded with the error too) and has a body onload to call itself (with the error).

Why display a form for the fraction of a second and open another page with a different form?

As far as the error is concerned:

in your main page, please add:

var id;

above the line:

function popUp(URL) {

then in quickship alter your function to:

function popUp(URL) {

eval("page" + window.opener.id + " = window.open(URL, '" + window.opener.id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=750,');");

}

If you insist in calling quicktrip from quickship, alter the function there like mentioned above for quickship, but please take out the onload="I call myself" from the body tag.

That should enable you to get rid of the error(s).

Please note:

All that has to be in one line(until: can't help... !):

eval("page" + window.opener.id + " = window.open(URL, '" + window.opener.id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=750,');");

(can't help the line breaks... ?)

Cheers - Pit
×

Success!

Help @TBA spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...