# Put dhtml into flash

**URL:** <https://forum.kirupa.com/t/put-dhtml-into-flash/19357>\
**Category:** flash\
**Created:** [April 27, 2003, 5:06am UTC](https://forum.kirupa.com/t/put-dhtml-into-flash/19357 "2003-04-27T05:06:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![genelo](https://avatars.discourse-cdn.com/v4/letter/g/ce7236/32.png) [@genelo](https://forum.kirupa.com/u/genelo)\
**Post date:** [April 27, 2003, 5:06am UTC](https://forum.kirupa.com/t/put-dhtml-into-flash/19357/1 "2003-04-27T05:06:35Z")

</div>

How to put dhtml scripts into flash?

\<script language=“javascript”\>

var win = null;  
function NewWindow(mypage,myname,w,h,scroll){  
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;  
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;  
settings =  
‘height=’+h+’,width=’+w+’,top=’+TopPosition+’,left=’+LeftPosition+’,scrollbars=’+scroll+’,resizable’  
win = window.open(mypage,myname,settings)  
}

\</script\>

----This is for the \<head\> tags

Then,

\<a href=“[http://www.XXX.com/xxx.swf](http://www.XXX.com/xxx.swf)” onclick=“NewWindow(this.href,‘name’,‘650’,‘420’,‘yes’);return false”\>Click\</a\>

----This is what I want to put that into the buttons, using javascripts

Is is possible?

Thank you

:pope: :pope: :pope: :pope:  
:bad: :bad: :bad: :bad:

---

<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:** [April 27, 2003, 5:10am UTC](https://forum.kirupa.com/t/put-dhtml-into-flash/19357/2 "2003-04-27T05:10:10Z")

</div>

oooops…I made a mistake, sorry…  
pls ignore the above message.  
Just dun click the above “click” will not make me embarass =P

This is for the html head tag,  
“var win = null;  
function NewWindow(mypage,myname,w,h,scroll){  
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;  
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;  
settings =  
‘height=’+h+’,width=’+w+’,top=’+TopPosition+’,left=’+LeftPosition+’,scrollbars=’+scroll+’,resizable’  
win = window.open(mypage,myname,settings)  
}”

This is what I want to put into flash buttons, using javascript??

“\<a href=“[http://www](http://www).???.com/???.swf” onclick=“NewWindow(this.href,‘name’,‘650’,‘420’,‘yes’);return false”\>Click\</a\>”

---

<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:** [April 27, 2003, 5:12am UTC](https://forum.kirupa.com/t/put-dhtml-into-flash/19357/3 "2003-04-27T05:12:22Z")

</div>

The html source is :

"onclick=“NewWindow(this.href,‘name’,‘650’,‘420’,‘yes’);return false”

want to put this into the flash ~~~~~ The above code was hidden  
, so I put the quotes.

God…
