# Open new window

**URL:** <https://forum.kirupa.com/t/open-new-window/10990>\
**Category:** Uncategorized\
**Created:** [January 10, 2003, 7:33am UTC](https://forum.kirupa.com/t/open-new-window/10990 "2003-01-10T07:33:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zephn](https://avatars.discourse-cdn.com/v4/letter/z/5f8ce5/32.png) [@zephn](https://forum.kirupa.com/u/zephn)\
**Post date:** [January 10, 2003, 7:33am UTC](https://forum.kirupa.com/t/open-new-window/10990/1 "2003-01-10T07:33:16Z")

</div>

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

```php

<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

```php
<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?

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 10, 2003, 7:37am UTC](https://forum.kirupa.com/t/open-new-window/10990/2 "2003-01-10T07:37:28Z")

</div>

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::

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 10, 2003, 7:46am UTC](https://forum.kirupa.com/t/open-new-window/10990/3 "2003-01-10T07:46:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 10, 2003, 7:50am UTC](https://forum.kirupa.com/t/open-new-window/10990/4 "2003-01-10T07:50:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 23, 2003, 1:26am UTC](https://forum.kirupa.com/t/open-new-window/10990/5 "2003-01-23T01:26:36Z")

</div>

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!
