[thelist] Form Mail

Keith Davis cache at dowebs.com
Fri May 25 11:38:55 CDT 2001

Ritwik Patra wrote:

> Yes! We can manage with the PHP script. I was wondering whether the "pop up"  thing and "close window" can be
> used without java script. Since you said no...where do I find the script for this purpose? Another question....can there
> be alternative ...Like if some has disabled java script ..Then he/she is provided with a simple format...I hope I am able
> to explain my requirement. Please do mention about the required java script....

The javascript you should use for closing your emailer window goes in
the body of the page that PHP will return after sending your email:

<script language=JavaScript>
document.write('<a href=javascript:window.close()>CLOSE</a>')

only a javascript enabled browser will see it, barbarians who run around
the web with javascript turned off will have to kill the window the old
fashioned way with their axe, but that's their choice.

As for opening the emailer window, the following will use the HTML
target to open a full size window for those same barbarians. Those with
javascript enabled will get a properly tailored and well mannered pop-up

<script language=javascript>
function emailer(){
LeftPos = (screen.width) ? (screen.width-wid)/2 : 0;
TopPos = (screen.height) ? (screen.height-hei)/2 : 0;

<font size=2 face=Verdana,Arial,Geneva,sans-serif>
<script language=javascript>
document.write('<a href=javascript:emailer()>Send Us Email</a>')
<NOSCRIPT><a href="URL_of_your_PHP" target="EMAIL">Send Us


More information about the thelist mailing list