Form Submit to JavaScript in Pop-up

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
hbnmgr
Forum Newbie
Posts: 13
Joined: Mon Mar 07, 2005 8:22 pm

Form Submit to JavaScript in Pop-up

Post by hbnmgr »

I am passing Form variables from a PHP page to an HTML Pop-up Window with JavaScript to receive and process the info. Basically a Calculator. It works on other pages, but not in the Pop-up Window. Everything shows up on the page, but the processing of the JavaScript.

Does anyone have a clue why its not working? ? ?

Thanks,
Steve R.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Post the code please. Cannot do squat without it :?
hbnmgr
Forum Newbie
Posts: 13
Joined: Mon Mar 07, 2005 8:22 pm

Posting Code ....

Post by hbnmgr »

Here is the code as requested;

ON THE FORM PAGE: In the Head

Code: Select all

<SCRIPT LANGUAGE="JavaScript">
function OpenWin(Loc, Width, Height) {
  var WinInfo =
"toolbar=no,scrollbars=yes,directories=no,resizable=yes,menubar=no,width=" + Width + ",height=" + Height

 wPageWindow = window.open(Loc, "wImageWindow", WinInfo);
  wPageWindow.focus();
}
</script>
In the Body

Code: Select all

<form method="get" action="javascript:OpenWin('calculate.html', 650, 400)">
The Calculator script on the receiving end works, so no change there, but begins this way ...

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Calculator Results</title>
</HEAD>
<BODY BGCOLOR="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" rightmargin="0" bottommargin="0" link="#0000FF" vlink="#0000FF" alink="#0000FF">


<h3>CALCULATOR RESULTS:</h3>


<SCRIPT LANGUAGE=javascript>
<!--
//-- put the URL with arguments into a variable we can parse
	var str = location.search;
	
//-- Get Name Value

Thanks!

SRR/arr
Post Reply