/    Sign up×
Community /Pin to ProfileBookmark

[B]Hello,[/B]
[B]I have a problem when I add this……[/B]
<script type=”text/javascript” language=”JavaScript” src=
http://exittraders.com/jsexit/roitan.js“>
[B]To this……[/B]

[code]
<script type=”text/javascript” language=”JavaScript1.2″>
var cssdefinition='<style>n.menuitems{nborder:2.5px solid #000000;n}nn.menuitems a{ntext-decoration:none;ncolor:72ABFF;n}n</style>’
if (document.all||document.getElementById)
document.write(cssdefinition)
function over_effect(e,state, bgcolor){
if (document.all)
source4=event.srcElement
else if (document.getElementById)
source4=e.target
if (source4.className==”menuitems”){
source4.style.borderStyle=state
source4.style.backgroundColor=bgcolor
}
else{
while(source4.tagName!=”DIV”){
source4=document.getElementById? source4.parentNode : source4.parentElement
if (source4.className==”menuitems”){
source4.style.borderStyle=state
source4.style.backgroundColor=bgcolor
}
}
}
}
</script>
<style type=”text/css”>
<!–
body {margin: 32px; color: black; background-color: white}
a {color: #ffffff}
a:hover {color: #0000ff; text-decoration: none}
a.title {font-weight: bold}
td {font: 12pt arial}
td.small {font-size: 10pt}
font.url {font-size: 10pt; color: #ffffff}
</style>
</script>
[/code]

[B]I get a page with errors, how do you add 2 js together?[/B]
[B]Kind Regards[/B]
[B]skipper23[/B]

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@jaegernautJan 21.2004 — You're nesting your scripts and your style.

Take the last </script> tag and move it up with the first tag.

<script type="text/javascript" language="JavaScript" src="http://exittraders.com/jsexit/roitan.js"></script>
Copy linkTweet thisAlerts:
@skipper23authorJan 21.2004 — Thank you for the reply. I see some of what you mean now with the nesting problem, but where excactly does the popup script go?
<i>
</i>&lt;script language="JavaScript1.2"&gt;
src="http://exittraders.com/jsexit/roitan.js"
var cssdefinition='&lt;style&gt;n.menuitems{nborder:2.5px solid #000000;n}nn.menuitems a{ntext-decoration:none;ncolor:72ABFF;n}n&lt;/style&gt;'
if (document.all||document.getElementById)
document.write(cssdefinition)

function over_effect(e,state, bgcolor){
if (document.all)
source4=event.srcElement
else if (document.getElementById)
source4=e.target
if (source4.className=="menuitems"){
source4.style.borderStyle=state
source4.style.backgroundColor=bgcolor
}
else{
while(source4.tagName!="DIV"){
source4=document.getElementById? source4.parentNode : source4.parentElement
if (source4.className=="menuitems"){
source4.style.borderStyle=state
source4.style.backgroundColor=bgcolor
}
}
}
}
&lt;/script&gt;
&lt;style&gt;
&lt;!--
body {margin: 32px; color: black; background-color: white}
a {color: #ffffff}
a:hover {color: #0000ff; text-decoration: none}
a.title {font-weight: bold}
td {font: 12pt arial}
td.small {font-size: 10pt}
font.url {font-size: 10pt; color: #ffffff}
&lt;/style&gt;
&lt;/head&gt;


I installed it at the top and at the bottom before the </script> end tag, I get no errors but I also get no popup.

If you could be more specific that would be great as I am a noob to js.

Kind Regards

skipper23
Copy linkTweet thisAlerts:
@jaegernautJan 21.2004 — You don't have any popup scripts on this post. Please post your code, or a link to where you have it. Unless you are saying that your popup script is in this external js file.

Looking at your newest post it looks like there is a problem with the external js file you are trying to load in.

It should look like this:
[code=php]<script type="text/javascript" src="http://exittraders.com/jsexit/roitan.js"></script>
<script language="JavaScript1.2">
var cssdefinition='<style>n.menuitems{nborder:2.5px solid #000000;n}nn.menuitems a{ntext-decoration:none;ncolor:72ABFF;n}n</style>'
if (document.all||document.getElementById)
document.write(cssdefinition)

function over_effect(e,state, bgcolor){
if (document.all)
source4=event.srcElement
else if (document.getElementById)
source4=e.target
if (source4.className=="menuitems"){
source4.style.borderStyle=state
source4.style.backgroundColor=bgcolor
}
else{
while(source4.tagName!="DIV"){
source4=document.getElementById? source4.parentNode : source4.parentElement
if (source4.className=="menuitems"){
source4.style.borderStyle=state
source4.style.backgroundColor=bgcolor
}
}
}
}
</script>
<style>
<!--
body {margin: 32px; color: black; background-color: white}
a {color: #ffffff}
a:hover {color: #0000ff; text-decoration: none}
a.title {font-weight: bold}
td {font: 12pt arial}
td.small {font-size: 10pt}
font.url {font-size: 10pt; color: #ffffff}
</style>
</head>
[/code]


Let me know if I'm misunderstanding what you need.
Copy linkTweet thisAlerts:
@skipper23authorJan 21.2004 — Sorry I meant exit exchange script. I tried the script you posted and that doesn't seem to work.


ie6 says there are errors on the page and nothing

comes up when you leave the page. The code from the

exit exchange website is...
[code=php]
<script language="JavaScript" src="http://exittraders.com/cgi-bin/exit/js.cgi?userid=roitan"></script>
[/code]

The original HTML from my site is....
[code=php]
<script language="JavaScript1.2">
var cssdefinition='<style>n.menuitems{nborder:2.5px solid #000000;n}nn.menuitems a{ntext-decoration:none;ncolor:72ABFF;n}n</style>'
if (document.all||document.getElementById)
document.write(cssdefinition)

function over_effect(e,state, bgcolor){
if (document.all)
source4=event.srcElement
else if (document.getElementById)
source4=e.target
if (source4.className=="menuitems"){
source4.style.borderStyle=state
source4.style.backgroundColor=bgcolor
}
else{
while(source4.tagName!="DIV"){
source4=document.getElementById? source4.parentNode : source4.parentElement
if (source4.className=="menuitems"){
source4.style.borderStyle=state
source4.style.backgroundColor=bgcolor
}
}
}
}
</script>
<style>
<!--
body {margin: 32px; color: black; background-color: white}
a {color: #ffffff}
a:hover {color: #0000ff; text-decoration: none}
a.title {font-weight: bold}
td {font: 12pt arial}
td.small {font-size: 10pt}
font.url {font-size: 10pt; color: #ffffff}
</style>
</head>
[/code]


Any idea on how to combine these 2 without causing errors?

Kind Regards

skipper23
Copy linkTweet thisAlerts:
@jaegernautJan 22.2004 — In the external script that you are importing, you have two lines that look like they should be calling a function but don't have the ().

window.onerror = errorIgnore;

window.onunload=openExitWin;

Both of these have functions with the same names and I didn't see any variables with these names, so that may be why you are having errors.
Copy linkTweet thisAlerts:
@skipper23authorJan 22.2004 — Thanks for the help jaegernaut,

but I'm gonna use a different popunder type script.

That snipet of script just doesn't seem to work and

I believe most peep's use a blocker anyway.

Kind Regards

skipper23
×

Success!

Help @skipper23 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.18,
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,
)...