/    Sign up×
Community /Pin to ProfileBookmark

Hi all,

I am having quite the frustrating problem here. All I want to do is popup a small window when my main page loads.

Here is what I have for the body tag

<body onload=”popupNTN()” bgcolor=”#ffffff” leftmargin=”0″ topmargin=”0″ marginwidth=”0″ marginheight=”0″>

The popupNTN is defined as:

<script LANGUAGE=”JavaScript” TYPE=”text/javascript”>
<!–
function popupNTN() {
window.open(“http://www.mydomain.com/PopUp.html“)
return true
}
//–>
</script>

This is not working though! I don’t understand. Firefox and IE are not reporting any type of javascript error. What am I doing wrong??

Thanks for the help!

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisSep 26.2006 — Do you have the browser set to allow all pop-ups?
Copy linkTweet thisAlerts:
@thechasboiSep 26.2006 — unnamedplayer

gil has a point about shutting off all types of pop up blockers. I also have come into problems with the "onLoad" event in some of my pages so I used something like as follows

at the very bottom of my code I create a seperate script tag and include this

window.onload=function () {libinit();}

and in a previously parsed script above this tag I include the function

function libinit(){

do stuff .......

more stuff ........

}
×

Success!

Help @unnamedplayer 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.20,
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,
)...