PDA

View Full Version : open new window



zephn
January 10th, 2003, 02:33 AM
I am having the most difficult time..

I am have a line of text in ie: January Photos
I want this word to be clickable to link me to a .swf file
I want this to open in a new window and set the size of this window
Is there a line in html, dhtml or java that in one line makes the type

IN Html the way to do this is without controling the size of the window is simply


<AHREF="http://www.swordinthestone.20m.com/thisislondon/010403.swf" TARGET="resource window">Click here to see what my current script does with html</A>
<A HREF="http://www.swordinthestone.20m.com/thisislondon/010403.swf" TARGET="resource window">Click here to see what my current script does with html</A>


in Java I have found this script


<FORM>
INPUT type="button" value="New Window!" onClick="window.open('http://www.pageresource.com/jscript/jex5.htm','mywindow','width=400,height=200')"
</FORM

<FORM>
<INPUT type="button" value="New Window!" onClick="window.open('http://www.swordinthestone.20m.com/thisislondon/010403.swf','mywindow','width=400,height=200')">
</FORM>

Now i need a line of script in html, javascript or dhtml that works like the java but allows me to use type as a link instead of a button.


Can anone tell me?



to show code. Please use [ PHP ] [ /PHP ] (no spaces) to show HTML code

lostinbeta
January 10th, 2003, 02:37 AM
I wrote this code, and use it all the time for my pop ups, and post this file a billion times for this question on the forum, it works great for everyone that has tried.....


::view attachment::

zephn
January 10th, 2003, 02:46 AM
DUDE you have made my day. You posted this last time i asked but i could not get it to work. i must have deleted a quotation mark or somthing. it rocks thanks man.

lostinbeta
January 10th, 2003, 02:50 AM
Yeah, Javascript is iffy like that, well of course missing a quotation mark can be fatal in any language, but in Javascript (and most other comp langauges) the choice between a single quote or a double quote can be fatal too. So if there is a single quote there, do not change it to a double quote or it won't work (and vice versa) ;)


Glad I could help you though.

nex
January 22nd, 2003, 08:26 PM
well, im just strange and couldn't figure out that javascript thing for the life of me! i tried probably a ridiculous number of times for something so simple. anyways, i used the fscommand openWindow as explained here (http://www.macromedia.com/support/flash/ts/documents/popup_windows.htm#explanation) . it was really simple and easy!