/    Sign up×
Community /Pin to ProfileBookmark

Stupid,Stupid,Stupid question

Hi Everybody,

I´ve got a problem here called body-onload.

In this tag
<BODY OnLoad=”javascript: window.open(”,’paypal’,”); document.paypal.submit();”>
has to be something inserted called

class=”main” (same function as target=main)

I´m grateful for everyone who took time to find a solution or even tried it:
Jiser

to post a comment
JavaScript

23 Comments(s)

Copy linkTweet thisAlerts:
@JonaJul 24.2003 — [font=arial][color=maroon]Um... What is the question? <body class="main">?[/color][/font]

[b][J]ona[/b]
Copy linkTweet thisAlerts:
@jiserauthorJul 24.2003 — Hi,

It should be something like this <BODY OnLoad="javascript: window.open('','paypal',''); document.paypal.submit();" class='main' >
Copy linkTweet thisAlerts:
@JonaJul 24.2003 — [i]Originally posted by jiser [/i]

[B]It should be something like this <BODY OnLoad="javascript: window.open('','paypal',''); document.paypal.submit();" class='main' > [/B][/QUOTE]


[font=arial][color=maroon]And your question is?[/color][/font]

[b][J]ona[/b]
Copy linkTweet thisAlerts:
@jiserauthorJul 24.2003 — How???

Forgot to say: you can tread class="main" the same as target=main.

In the beginning the function was included in a button.


<TD width="25%" align="right"><A href="javascript: window.open('','paypal',''); document.paypal.submit();"><img src="assets/images/sendorder.gif" width="168" height="85" alt="Send purchase order" border="0" align="bottom" hspace="0" vspace="0" class="main"></a></TD>

Now I want to do this in the body onload, this goes after all not without problems. It crashes or gives a blank page
Copy linkTweet thisAlerts:
@JonaJul 24.2003 — [font=arial][color=maroon]Uh...[/color][/font]

[font=monospace]

<body onload="window.open('','paypal'); document.paypal.submit();" class="main">

[/font]

[b][J]ona[/b]
Copy linkTweet thisAlerts:
@jiserauthorJul 24.2003 — Doesn´t work, it gives a blank page
Copy linkTweet thisAlerts:
@jiserauthorJul 24.2003 — When the browser does not recognise the part class="main", it´ll automately display a blank page.
Copy linkTweet thisAlerts:
@JonaJul 24.2003 — [font=arial][color=maroon]Take off the class="main" part and put all of the CSS in the .main class into the body { } part of the CSS in the STYLE tags in the head of your document.[/color][/font]

[b][J]ona[/b]
Copy linkTweet thisAlerts:
@jiserauthorJul 24.2003 — I don´t understand, There are no style tags in the head of the document. If you want I can send the file.htm to you

Jiser
Copy linkTweet thisAlerts:
@JonaJul 24.2003 — [font=arial][color=maroon]Do you have a link so that I can see it online?[/color][/font]

[b][J]ona[/b]
Copy linkTweet thisAlerts:
@jiserauthorJul 24.2003 — You´ll see a lot of errors (that´s because it´s a shoppingcart to PayPal) But you can chose View Source
Copy linkTweet thisAlerts:
@JonaJul 24.2003 — [font=arial][color=maroon]You should only have one body tag, to start with. Second, when you use window.open('','paypal'); you have nothing in the first option, so it opens a new window without anything in it. Change it to something like window.open('http://paypal.com/','paypal');[/color][/font]

[b][J]ona[/b]
Copy linkTweet thisAlerts:
@jiserauthorJul 24.2003 — I´ve changed into below. Now it gives a third window (404)(c:/..........paypal

<body onload="window.open('','paypal'); document.paypal.submit();" class="main">

What to do?
Copy linkTweet thisAlerts:
@JonaJul 24.2003 — [font=arial][color=maroon]It's window.open('http://site.com/', 'paypal');[/color][/font]

[b][J]ona[/b]
Copy linkTweet thisAlerts:
@jiserauthorJul 24.2003 — PayPal referres to <script type="text/javascript" language="JavaScript1.2">

xmlOHeader.GrandTotal = encryptTextData(TFormatCurrencyOnly(tmpTotal, objPriCurrency));

document.write('<FORM NAME="paypal" document.write('<INPUT TYPE="hidden"

[B]ACTION="https://www.paypal.com/cgi-bin/webscr" METHOD="POST" target="paypal">');[/B]

NAME="cmd" VALUE="_xclick">');

document.write('<INPUT TYPE="hidden" NAME="amount" value='+decryptTextData(xmlOHeader.GrandTotal)+'>');

so you don´t have to enter a address to it
Copy linkTweet thisAlerts:
@JonaJul 24.2003 — [font=arial][color=maroon]Take everything out of the body tag except for this:[/color][/font]

[font=monospace]

document.paypal.submit();

[/font]

[font=arial][color=maroon]And make your form tag have this: target="paypal"[/color][/font]

[b][J]ona[/b]
Copy linkTweet thisAlerts:
@jiserauthorJul 24.2003 — Done!

He still gives a blank page to the paypal systems. Somewhere has class="main" to be inserted.

make your form tag have this: target="paypal"[/QUOTE]

It was already in there or do I have to change something more in there?
Copy linkTweet thisAlerts:
@JonaJul 24.2003 — [font=arial][color=maroon]Well, your body tag only needs the line I said it needs. It should work then.[/color][/font]

[b][J]ona[/b]
Copy linkTweet thisAlerts:
@jiserauthorJul 24.2003 — Automately if you don´t give it a class, it´ll automately use a blank page. I can make the test-website online if you prefer.
Copy linkTweet thisAlerts:
@jiserauthorJul 24.2003 — Ok,

Should be online by any minute now

The address is www.posterland.nl/~support

I have to assist you because it´s a other language. Do you have MSN.
Copy linkTweet thisAlerts:
@JonaJul 24.2003 — [font=arial][color=maroon]See my profile. [/color][/font]

[b][J]ona[/b]
Copy linkTweet thisAlerts:
@jiserauthorJul 24.2003 — Can´t be done by the site online. I think it´s possible via MSN. Could you accept me in your MSN?
×

Success!

Help @jiser 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.24,
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,
)...