PDA

View Full Version : Pop-Up window issue



lala
03-05-2007, 11:43 AM
Hi there,

I created a JavaScript Link that opens a Pop-Up window with the relevant content. To close the window I used the following code:

<FORM>
<INPUT name="button" type=button onClick="javascript:window.close();" value="Close Window">
</FORM>

On the W3C validation service I found that each FORM tag needs to have the ACTION attribute specified. What do I specify to simply close the window?

It would be great if someone could help me out on this.

lala

davebarnes
03-05-2007, 11:58 AM
I don't think you need the <form>.

See http://www.codelifter.com/main/tips/tip_017.shtml
which says:

For a regular window, use this:

Close (javascript:window.close())

lala
03-05-2007, 12:37 PM
Thank you so much! It works perfectly fine and now complies with the W3C ...

lala