[thelist] Submit a form and shut the window

Christian Heilmann lists at onlinetools.org
Tue Feb 1 16:45:40 CST 2005


Jay Blanchard wrote:

>[snip]
>I have a form in a little window, and it's supposed to update in the 
>main window.  I guess I can do that using JavaScript: the form action 
>is the main page with a TARGET of the main window.
>
>But that will leave the little window floating around.  Is there any 
>way I can get the little b**tard to commit suicide once its work is 
>done?
>[/snip]
>
>You need to use a variation of this....
>
><!-- now that we have done everything else, close this window -->
>onCLick="javascript:window.close();"
>
>  
>
Sorry to be pedantic: I don't know who started with  this, but the 
javascript: is completely redundant here, onclick (same as onmouseeover 
and all the others) already imply that there is a script to be called 
(http://www.w3.org/TR/REC-html40/interact/scripts.html). "javascript:" 
as a protocol is an abomination and has to go. Also, camelcase is not 
valid for attributes in XHTML (http://www.w3.org/TR/xhtml1/#diffs) .





More information about the thelist mailing list