Page 1 of 1

Post variable to popup without submit?

Posted: Sat Jul 09, 2005 12:16 am
by facets
Q. Is there a way to post a variable to a javascript popup without using a submit?

I have 7 submits on a page, they all do their jobs ok as is except,

1. All submits reset the form. Even if the function that the submit executes is just a view stockId (etc) function
2. All submits enter data to the DB and shouldn't

I thought buy removing 6 of the 7 submits it may make coding this page easlier.
(i wish nested forms existed:)

Any ideas?
Tia, Will

PS, I've tried the folloing and it didn;t work.

Code: Select all

echo &quote;<a href='&quote;.$_SERVER&#1111;'PHP_SELF'].&quote;?action=view&stockId=&quote;.$stockId.&quote;','','scrollbars=yes,status=yes,windowX=10,windowY=10,width=440,height=570'>Word</a>&quote;;

Posted: Sat Jul 09, 2005 2:27 am
by facets
Got it sussed!
Just for the record here it is..

Code: Select all

<a href=\&quote;javascript:;\&quote; onClick=\&quote;window.open('Add.php?action=viewFace&Id=' + document.forms.Summary.Id.value, null, 'windowX=10,windowY=10,width=440,height=570'); 
	return false\&quote;>Popup</a>