Anyone remember the code for this offhand? I had it written down somewhere, danged if I can find it.
I want the user to be able to click a link, have it open in a new window, but set to a size I dictate and unable to resize it.
Thanks.
Height / Width Defined popup
- Akaran_D
- Way too much time!
- Posts: 4151
- Joined: July 3, 2002, 2:38 pm
- Location: Somewhere in my head...
- Contact:
Height / Width Defined popup
Akaran of Mistmoore, formerly Akaran of Veeshan
I know I'm good at what I do, but I know I'm not the best.
But I guess that on the other hand, I could be like the rest.
I know I'm good at what I do, but I know I'm not the best.
But I guess that on the other hand, I could be like the rest.
- Xouqoa
- Way too much time!
- Posts: 4105
- Joined: July 2, 2002, 5:49 pm
- Gender: Mangina
- XBL Gamertag: Xouqoa
- Location: Dallas, TX
- Contact:
<pre>
<script language="JavaScript">
function openWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
</script>
<a href="#" onClick="openWindow('whatever.htm','windowName','scrollbars=yes,width=500,height=150')">link</a>
</pre>
That should do it!
<script language="JavaScript">
function openWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
</script>
<a href="#" onClick="openWindow('whatever.htm','windowName','scrollbars=yes,width=500,height=150')">link</a>
</pre>
That should do it!
"Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings." - John F Kennedy
- Akaran_D
- Way too much time!
- Posts: 4151
- Joined: July 3, 2002, 2:38 pm
- Location: Somewhere in my head...
- Contact:
Thanks Xou!
Akaran of Mistmoore, formerly Akaran of Veeshan
I know I'm good at what I do, but I know I'm not the best.
But I guess that on the other hand, I could be like the rest.
I know I'm good at what I do, but I know I'm not the best.
But I guess that on the other hand, I could be like the rest.
- Akaran_D
- Way too much time!
- Posts: 4151
- Joined: July 3, 2002, 2:38 pm
- Location: Somewhere in my head...
- Contact:
Know of a way to make that code automatically size?
Going to be using it to take image thumbnails and have the user click on them to open up the image to its standard dimensions.. but I have many iamges of varying H and W.
That possible?
Going to be using it to take image thumbnails and have the user click on them to open up the image to its standard dimensions.. but I have many iamges of varying H and W.
That possible?

Akaran of Mistmoore, formerly Akaran of Veeshan
I know I'm good at what I do, but I know I'm not the best.
But I guess that on the other hand, I could be like the rest.
I know I'm good at what I do, but I know I'm not the best.
But I guess that on the other hand, I could be like the rest.
It is a bit more involved...Akaran_D wrote:Know of a way to make that code automatically size?
Going to be using it to take image thumbnails and have the user click on them to open up the image to its standard dimensions.. but I have many iamges of varying H and W.
That possible?
First, for your information pop-up blockers tend to stop javascript from opening new windows, so you may want to consider not using javascript because most users won't appreciate having to turn off their blocker or going through the trouble to add your site to the exception list.
It is possible to retrieve the size of an image that has been loaded by javascript. From these dimensional you can adjust the size of a window after it has been opened. If I find some time later today, I may even write up the code for you, but don't count on it!

[65 Storm Warden] Archeiron Leafstalker (Wood Elf) <Sovereign>RETIRED
- Akaran_D
- Way too much time!
- Posts: 4151
- Joined: July 3, 2002, 2:38 pm
- Location: Somewhere in my head...
- Contact:
Alright - any way to do it that does not involve using JS?
Akaran of Mistmoore, formerly Akaran of Veeshan
I know I'm good at what I do, but I know I'm not the best.
But I guess that on the other hand, I could be like the rest.
I know I'm good at what I do, but I know I'm not the best.
But I guess that on the other hand, I could be like the rest.