|
-
Dec 28th, 2003, 07:47 PM
#1
Thread Starter
Addicted Member
tag for new, smaller window
What's the HTML tag for opening a new, smaller window? ...and how do i specifiy the new size or whatever? Thanks
- you've been privileged to read a post by Miz
-
Dec 29th, 2003, 12:10 AM
#2
Lively Member
window.open("something.html", "name", "toolbar,status,height=HEIGHT,width=WIDTH");
etc etc etc

-morrowasted
-
Dec 29th, 2003, 12:44 AM
#3
Thread Starter
Addicted Member
Originally posted by morrowasted
window.open("something.html", "name", "toolbar,status,height=HEIGHT,width=WIDTH");
etc etc etc
so it's javascript?
- you've been privileged to read a post by Miz
-
Dec 29th, 2003, 04:30 AM
#4
Frenzied Member
Have I helped you? Please Rate my posts. 
-
Dec 29th, 2003, 09:08 AM
#5
If you don't want to use javascript for some reason, you can use a hyperlink and make its target property "_blank".
But then you have no control over size or position, etc.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Dec 29th, 2003, 10:47 AM
#6
Thread Starter
Addicted Member
alright, sorry fellas...i'm new to js
- you've been privileged to read a post by Miz
-
Dec 29th, 2003, 02:29 PM
#7
Frenzied Member
If you need help implementing it, just ask.
Have I helped you? Please Rate my posts. 
-
Dec 29th, 2003, 06:19 PM
#8
Thread Starter
Addicted Member
Originally posted by Acidic
If you need help implementing it, just ask.
how dare you read my mind!? ...anywho, how do i implement it into an html doc or what do i have to do...you get the idea. thanks a lot.
- you've been privileged to read a post by Miz
-
Dec 29th, 2003, 07:06 PM
#9
Lively Member
erm...
<a onclick="window.open('something.html', 'name', 'toolbar,status,height=HEIGHT,width=WIDTH');" href="#">
or
<script>
function MakeWindow(){
window.open('something.html', 'name', 'toolbar,status,height=HEIGHT,width=WIDTH');
}
<script>
and
<a onclick="MakeWindow()" href="#">

-morrowasted
-
Dec 29th, 2003, 10:51 PM
#10
Thread Starter
Addicted Member
Originally posted by morrowasted
erm...
<a onclick="window.open('something.html', 'name', 'toolbar,status,height=HEIGHT,width=WIDTH');" href="#">
you are the man. exactly what i needed. thanks!
one thing though...here's the exact line i use:
Code:
<a onclick="window.open('contacts.html', 'Contacts', 'toolbar,status,height=500,width=500');" href="contacts.html">Contact Us</a>
but it opens the link in the same window as well as opening it in the new one
Last edited by dolor; Dec 29th, 2003 at 10:55 PM.
- you've been privileged to read a post by Miz
-
Dec 30th, 2003, 03:03 AM
#11
Fanatic Member
you dont need the href in there, you are telling it to open the popup aswell as the page as a normal hyperlink. Change to:
Code:
<a onclick="window.open('contacts.html', 'Contacts', 'toolbar,status,height=500,width=500');">Contact Us</a>
-
Dec 30th, 2003, 11:00 AM
#12
Thread Starter
Addicted Member
- you've been privileged to read a post by Miz
-
Dec 31st, 2003, 05:54 AM
#13
Better yet, change it to
<a onclick="window.open('contacts.html', 'Contacts', 'toolbar,status,height=500,width=500'); return false" href="contacts.html">Contact Us</a>
This way, there's a popup in JavaScript-enabled browsers and a normal link in others, so you avoid locking people out.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 31st, 2003, 09:52 AM
#14
Thread Starter
Addicted Member
Originally posted by CornedBee
Better yet, change it to
<a onclick="window.open('contacts.html', 'Contacts', 'toolbar,status,height=500,width=500'); return false" href="contacts.html">Contact Us</a>
This way, there's a popup in JavaScript-enabled browsers and a normal link in others, so you avoid locking people out.
sweet. thanks. i have seen that return statement before, but wasn't sure about what it does.
- you've been privileged to read a post by Miz
-
Dec 31st, 2003, 12:44 PM
#15
It prevents the browser from doing any default action following the event. In the case of a link this means following the link.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 31st, 2003, 01:51 PM
#16
Thread Starter
Addicted Member
Originally posted by CornedBee
It prevents the browser from doing any default action following the event. In the case of a link this means following the link.
you know, i like this JS stuff. it's pretty simple and makes the interface more user-friendly and all that, but it has a few bugs when moving from browser to browser. i have heard that this is why many people have moved to perl. what do you think about this?
- you've been privileged to read a post by Miz
-
Jan 1st, 2004, 08:55 AM
#17
Nothing. Perl in CGI scripts is a server-side language, JavaScript is client-side. Their purposes are different, as are the things you can do with them. You can't do an image rollover with Perl, and you can't retrieve data from a database with JavaScript.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Jan 1st, 2004, 06:17 PM
#18
Thread Starter
Addicted Member
Originally posted by CornedBee
Nothing. Perl in CGI scripts is a server-side language, JavaScript is client-side. Their purposes are different, as are the things you can do with them. You can't do an image rollover with Perl, and you can't retrieve data from a database with JavaScript.
ah, makes sense. good show.
- you've been privileged to read a post by Miz
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|