erieko
05-18-2003, 01:06 PM
hi! i'm not too sure where this thread so go, really..
i've been wanting a pop-up script that would allow me to pop-up images from a text link. and it's not just one image, it's from quite a few links.. and i'd like to adjust the height/width attributes of those pop-ups & label those images too.
should i use a script, or should i just target=_blank it?
would i be able to adjust the height/width of the new frame if i were to target=_blank it?
thanks! :)
amicus
05-18-2003, 02:15 PM
you'll need to use a script similar to the one below. put the function inside the 'script' tag and your link will look like the one below it. just change the attributes in the link and that one function will popup a new window.
function popUp( url, title, features ) {
window.open( url, title, features );
}
<a href="javascript:popUp( 'http://www.lissaexplains.com/', 'Lissa', 'height=200,width=400,status=yes,toolbar=no,menuba r=no,location=no' )">text</a>
erieko
05-18-2003, 03:11 PM
hi, i did as you suggested -- is my script supposed to be :-
<script language="javascript">
//<!--
function popUp( url, title, features ) { window.open( url, title, features );
}
-->
</script>
does it have to be in one whole line, or any particular order?
i put this code in for my text pop-up, but it didn't work ;___;
<a href="javascript:popUp('atashi.jpg','height=200,width=20 0,status=yes,toolbar=no,menubar=no,location=no')">me</a>
zangerbanger
05-18-2003, 06:51 PM
If you are new to pop-up windows, I'd suggest going to this site:
http://www.magitek-designs.net/index.php?magitek=tutorials_popup
The pop-ups there are simple and easy to learn :). After that, you may consider using a different style of pop-ups.
amicus
05-19-2003, 03:32 AM
it's not working 'cos you didn't link to a page and the title isn't set. you have to create new page with the image on it. this link will only open the page with the specified features. it's just another way of opening a page, it doesn't generate the page. i made some change to your link give this a try (the link goes on one line and 'page.html' is one word.)
<a href="javascript:popUp('page.html','atashi','height=200, width=200,status=yes,toolbar=no,menubar=no,locatio n=no')">me</a>