/    Sign up×
Community /Pin to ProfileBookmark

How to open message window after if/else statement?

Hi all:

Would you help me to do this:

I want to open a message page after if/else statment.

<html>
if …..
{
print this …………….
}
else
{
open message.html ….I am stucked here. what should I put here to automatically open message.html page.
}
</htm>

Thanks

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@WebnerdJun 14.2006 — window.open(url, winname, options)
Copy linkTweet thisAlerts:
@abou_hmedJun 14.2006 — you can use alert('you text');

or window.open('your page.html','_BLANK');
Copy linkTweet thisAlerts:
@smallstoneauthorJun 14.2006 — Webnerd and abou.hmed:

Thank you for your replies.

I used window.open('message.html', '_blank');

It prints a blank page.

How can I get the message.html opened please?

Thanks

SS
Copy linkTweet thisAlerts:
@smallstoneauthorJun 14.2006 — #4 Today, 10:07 AM


smallstone


Registered User Join Date: Jun 2006

Posts: 6

Webnerd and abou.hmed:

Somehow the file of first window still in the url addresss box. I think I should do a command to close that window before open the message.html window. is that right?

if I will do so, please show me how to close it.

If/esle

......

SS
Copy linkTweet thisAlerts:
@abou_hmedJun 15.2006 — If u mean that u want to close the parent page

use window.open('message.html', '_self')

unless please declare more
×

Success!

Help @smallstone 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 6.17,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...