Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-10-2003, 12:13 PM   PM User | #1
James Odell
New to the CF scene

 
Join Date: Jan 2003
Location: Cape Town
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
James Odell is an unknown quantity at this point
Question Pop up window closure

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
James Odell is offline   Reply With Quote
Old 01-10-2003, 12:53 PM   PM User | #2
brothercake
Senior Coder


 
Join Date: Jun 2002
Location: near Oswestry
Posts: 4,508
Thanks: 0
Thanked 0 Times in 0 Posts
brothercake is an unknown quantity at this point
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
brothercake is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:03 AM.


Advertisement
Log in to turn off these ads.