By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,654 Members | 1,811 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,654 IT Pros & Developers. It's quick & easy.

Open page in new window

P: n/a
Hi googlers
I'm creating a portal on MS Office Portal Server. Unfortunaterly
there's no way to open a link of the navigation in a new window.
Now I'm trying to create a homepage with a webpart which contains a
forwarding to a homepage. The page has to be opened in a new window.
Unfortunately I don't know JavaScript, please help me :-)
I found in the internet some solutions, but I can't understand
everything. At the moment my code looks like that:
<html>
<head><title>Test</title>
<script type="text/javascript">
function OpenWin (Adresse) {
Fenster1 = window.open("http://localhost/asp", "testlink.htm");
Fenster1.focus();
}
</script>
</head>
<body>
<a href="testlink.htm" onclick="OpenWin(this.href); return false">open
link in new window</a>
</body>
</html>

Path of the file is: C:\inetpub\wwwroot\asp\weiterleitung.htm
localhost is C:\inetpub\wwwroot
what's wrong?
Thanks a lot for your help
Regards
Michael

Jan 26 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Bechtle wrote on 26 jan 2006 in comp.lang.javascript:
Fenster1 = window.open("http://localhost/asp", "testlink.htm"); [..]
what's wrong?


Reread the definition of window.open()

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 26 '06 #2

P: n/a
the definition i know on de.selfhtml.org doesn't work. Can you link me
a definition or a site where i can find definitions?

thanks

Michael

Jan 26 '06 #3

P: n/a
<a href="testlink.htm" target="_blank">open link in new window</a>

Jan 26 '06 #4

P: n/a
Bechtle wrote on 26 jan 2006 in comp.lang.javascript:
the definition i know on de.selfhtml.org doesn't work. Can you link me
a definition or a site where i can find definitions?


Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at the
top of the article, then click on the "Reply" at the bottom of the article
headers.

=================

window.open('http://myCom.com/myFile.html')

window.open('http://myCom.com/myFile.html','myWindow','height=100,etc')

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jan 26 '06 #5

P: n/a
Evertjan. said the following on 1/26/2006 6:08 AM:
Bechtle wrote on 26 jan 2006 in comp.lang.javascript:
the definition i know on de.selfhtml.org doesn't work. Can you link me
a definition or a site where i can find definitions?


Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at the
top of the article, then click on the "Reply" at the bottom of the article
headers.

=================

window.open('http://myCom.com/myFile.html')

window.open('http://myCom.com/myFile.html','myWindow','height=100,etc')


You forgot the third one, which is the one the OP is using. There is
nothing that says the third parameter is required.

window.open('http://myCom.com/myFile.html','myWindow')

There *is* a problem with the second parameter having a period in it though.

To the OP:

function OpenWin (Adresse) {
Fenster1 = window.open("http://localhost/asp", "testlink.htm");
Fenster1.focus();

You never use the parameter you pass to the function.

Fenster1 = window.open(Adresse, "windowName");

The second parameter to window.open is the window name. IE will fold up
on you if it has a period in it.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 26 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.