/    Sign up×
Community /Pin to ProfileBookmark

Problems with Javascript and IE

I am having problem opening a new window via javascript in IE. Here is my code:

function GetPage()
{
window.open (‘../NewPage.htm’, ‘Name of Page’, config=’height=500, width=375, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, directories=no, status=no’)
}

I need NewPage to be located in the parent directory of the HTML page that i am making the call from, since i am using CGI and i can’t have the webpage be in the cgi-bin.

Anyone have any idea if this can be done with Internet Explorer?

BTW, Netscape opens it without any problems.

Thanks, in advance

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@BillyRayJul 26.2004 — Try this:

function GetPage() {
window.open('../NewPage.htm', 'NameOfPage', 'height=500,width=375,scrollbars');
}


Hope this helps,

Dan
Copy linkTweet thisAlerts:
@steelersfan88Jul 26.2004 — Normally, using the "/" will automatically return to the parent directory. What happens using Dan's code with the ".."?
Copy linkTweet thisAlerts:
@PittimannJul 26.2004 — Hi!

BillyRay's suggestion will work. It is the spaces in the second argument, IE is complaining about.

Cheers - Pit
Copy linkTweet thisAlerts:
@BillyRayJul 26.2004 — It is the spaces in the second argument, IE is complaining about.[/quote]

I wasn't sure if it was that or not - but thanks for confirming it. I just tidied up the line (to my own standards ?), and removed all the redundant flags from the arguments parameter.

Dan
Copy linkTweet thisAlerts:
@steelersfan88Jul 26.2004 — ... and it seems you just have a fake second argument anyway. You can change that to "_blank" if you want it to open in a new window by default, instead of "" (if you are planning not to name your window). [url=http://www.webreference.com/js/tips/000421.html]Window Open[/url]

Dr. Script
Copy linkTweet thisAlerts:
@PittimannJul 26.2004 — Hi BillyRay!

Surprisingly, even the "config='...'" stuff wouldn't disturb.I just tidied up the line (to my own standards ), and removed all the redundant flags from the arguments parameter.[/QUOTE]:p - well done - I had done so as well, but when previewing my reply, I saw steelersfan88's post and yours.

Regards - Pit
Copy linkTweet thisAlerts:
@AbstractRealityauthorJul 26.2004 — Thanks for all the input guys,

I still cant belive that was the problem.

Just to confirm, the problem was the spaces in the name of the new page. Everything else was valid syntax that IE recognized.

Thanks again.
×

Success!

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