...

View Full Version : Pop up window closure



James Odell
01-10-2003, 01:13 PM
POP UP WINDOW CLOSURE PROBLEM

I'm using code to open a small pop up window which has a form. Once submit is pressed I want the window to close. I'm using code from a Pop Up Window tutorial but it does not work. I get a 500 error message "internal server problem" in the pop up window. I'm using Matt's Formmail.pl (renamed) and I get the email so that is working.

Your help would be appreciated.

I've included the code below. I'm a designer so I know very little about coding.

CODE TO OPEN POP UP WINDOW

<a href="Library/medical_insurance_files/contactform.htm" target="NewWindow" onclick="window.open('medical_insurance_files/contactform.htm','newWindow','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,res izable=0,width=320,height=250');return false">Barry
P Fletcher & Associates</a>


CODE IN THE POP UP WINDOW

<form method="post" action="/cgi-bin/contactmail.pl" name="Medical Insurance Contact Form" onClick="return targetopener(this,true,true)">
<input type=hidden name="required" value="realname,email">
<input type=hidden name="print_config" value="realname,email">

<script language=javascript>
<!--
var username = "james";
var hostname = "ripplewebs.com";
var linktext = username + "@" + hostname;
var theinput ("<input type=hidden name=recipient value=" +username + "@" + hostname" + ">";
document.write(theinput);
//-->
</script>

James

brothercake
01-10-2003, 01:53 PM
Closing a window which you opened is as simple as

self.close()


a 500 error is nothing to do with javascript, it's a server error; there's something going wrong with the mail script, or with the way you're addressing it



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum