PDA

View Full Version : java script and pop up


nebraska
05-21-2002, 09:43 AM
Hi,
I have an apparently simple question to ask but I don't know how to do it...
I have made a site with flash mx and 2 pop up with Golive. I want to add some buttons on the pop up with java script (I know how to do with golive but it creates very heavy external text).

My problem is I don't know how to write java scripts to
- close the pop up
- send to a friend
- answer the pop up
- print

Thanx a lot

mad_A
05-21-2002, 11:00 AM
to close the pop-up -

when you launch it you give it a name -
window.open(url,name,features);
to close it just use -
window.close(name);

to send to a friend -

Use a html form that calls to an automail script, or just use mailto:address

I don't get what you mean by answer the pop-up. To print use -

mad_A
05-21-2002, 11:50 AM
opps - sent before I finished...

for print use...
if (window.print)
document.write('<form><input type="button" value="Print" onClick="window.print()"><\/form>');

this will hide the button from browsers that don't support the print from javascript.

for more on e-mailing from javascript see this link

http://tech.irt.org/articles/js071/index.htm