Post variable to popup without submit?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
facets
Forum Contributor
Posts: 273
Joined: Wed Apr 13, 2005 1:53 am
Location: Detroit

Post variable to popup without submit?

Post 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;;
facets
Forum Contributor
Posts: 273
Joined: Wed Apr 13, 2005 1:53 am
Location: Detroit

Post 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>
Post Reply