javascript\buttonevent

G

gh

I have the following js in the onclick event of a button to open another
form, for the user to select a customer from.

Response.Write("<script language='javascript'>
window.showModalDialog('SelectCustomer.aspx','Select
Customer','dialogHeight:550px; dialogWidth: 700px; edge: Raised; center:
Yes; scroll: Yes;');</script>");

In the Select Customer Page I would like to pass back an Object or a
value of True to be able to do more processing with the customer
information, after the select customer page is closed. Here is the code
I have in the event of the Close button on the Select Customer page:

Response.Write("<script language='javascript'>window.close();</script>");

What needs to be added to the js to make this happen or is there another
way?

Thanks
 
D

dan.c.roth

Hi

Do something like this

var returnDepot =
window.showModalDialog("SignOnDepot.htm","","dialogHeight: 360px;
dialogWidth: 345px;status: no;scroll: Yes;resizable: yes;" + pos);

and

window.returnValue = "xxxx";

Regards,

Daniel Roth
MCSD.NET
 
G

gh

Dan:

If I have an ASP.NET textbox on my parent page (textBox1) and in the js
function use

if (returnDepot != null) document.getElementById(textBox1).value =
returnDepot;

Will this put the return value in the textBox? What I would like to do
is have an ASP.NET button on the parent page get clicked from the js
function if a value is passed back.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top