Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Submitting a "popup" form

Status
Not open for further replies.

laurin1

MIS
Apr 28, 2003
77
US
I want to write a form into a createPopup function. Is this possible and how would I do it? I wrote this, but I get an error:

Code:
		function ChangeDate($sID, $sDateTime){
  			var $oWin = window.createPopup();
  			var $oBody = $oWin.document.body;
  			$oBody.style.backgroundColor = '#0000FF';
  			$oBody.style.border = 'solid thin black';
  			$oBody.innerHTML = '<form name="frmNotInList" method="get" ' +
  								'action="<?=$_SERVER['PHP_SELF']?>" id="frmNotInList" ' + 
  								'style="margin: 2%; background-color:#FFFFFF; border: ' +
  								'1px #000000 groove">' +
  							'<strong>Enter the correct date and time: <br /></strong>' +
  							'<input type="TEXT" name="' + $sID + '" id="txtDateTime" ' +
  								'class="patientinput"' +
  								'style="width: 95%" value="' + $sDateTime + '"><br />' +
							'<input type="submit" name="cmdSubmit" id="cmdSubmit" ' + 
								'onClick="document.frmNotInList.submit()" ' +
								'class="patientinput" value="Submit"> <br /><br />' +
							'</form>';
  			$oWin.show(150,150,300,100,document.body);
  		}

Using a Submit command button does nothing. No error. Nada.

Keith Davis
MCSA, A+, N+, Guru+, Geek+, Child of God++++++
Love and Service
 
What's with the dollar signs? That looks like you merged Perl and JavaScript.
 
Javscript takes $ for variables, or you can do it without. I prefer, as I do a lot of PHP and it confuses me seeing variables without $.

Keith Davis
MCSA, A+, N+, Guru+, Geek+, Child of God++++++
Love and Service
 
I realize that normally, however, in my popup, the Submit does nothing (it just doesn't work), so I thought maybe it doesn't work that way with Popups and tried the onclick.

Keith Davis
MCSA, A+, N+, Guru+, Geek+, Child of God++++++
Love and Service
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top