Click to See Complete Forum and Search --> : javascript quick question


r00tsec
08-07-2003, 04:45 PM
I have a real quick question concerning JS. Is it possible for me to make a link to an .html or .htm page and have the JS embedded in the page, and have only the JS popup come up? I guess I should make that more clear....what I am trying to do is I want a popup window to come up but I wrote the site in flash. I made a link to a .htm page in the flash and I want it so that when people click on the .htm link the js just runs with the popup. Is this possible at all or no? can I just make a link to the JS? Anyone?:)

Khalid Ali
08-07-2003, 05:17 PM
:confused: :confused: :confused: :confused: :confused: :confused: :confused:

r00tsec
08-07-2003, 05:29 PM
hmmm, ill try to explain it better. I am trying to get a popup to run when someone clicks a link in my flash movie. However I don't believe i can put the JS in flash, so I dont know what to do. Thats the jist of it I guess.

cflynn
08-08-2003, 03:39 AM
It might be a dumb question, but is there any reason why you don't want to put an action on the link in the Flash movie? With the getURL action you can specify a _blank window as the target and the link would open in a new window.

Just thought of something:
In MX on the property bar there is a 'Render as HTML button.'
The symbol on the button looks like this: <>
If you make a text box, give it an instance name and then write a line in the action window like this:
textBoxName.htmlText = "<a href='http://www.yahoo.com' target='newWindow' onClick='window.open(about:blank, newWindow, );'>Click Me</a>";
you can open a new window, target it and set all the properties with javascript. You can do it in flash 5 too, by setting the text type to html or dynamic (can't quite remember) in the property box.