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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open a pop up window for sending emial when click on a button

Status
Not open for further replies.

apexbs

Technical User
Jun 2, 2002
42
CA
Hi ;

I am using ASP.NET and VB.NET 2003. I am trying to do one thing. I have a update button to update record in a grid. I want to launch a pop up window whenever user press upate button. That small pop up window will not have anything but a text box with a button send to send email to a person. When user press Send Button then it should close the pop up window and focus to the last window.

I have code for sending emails, I need help in opening that pop up window and passing some parameter to that window and close on send button.

Thanks.
 
<input type="submit" name="button" value="Update" onClick="window.open('email.asp?var1=stuff&var2=morestuff',emailwin,width:300px;height:300px')">

You can use that button to open a popup and replace the varibles passed dynamically.


To close the popup:

<input type="submit" name="button" value="Send" onClick="window.close">
 
Thanks,

I have one more question related to your answer, actually, my button is in Grid and Grid built in button, I want to invoke that pop up window just after saving records into database on update button of Grid records. I want to do two functions on button click.

Button_Click()
1- SaveRecords()
2- OpenWindow()

How can I use only this line.

window.open('email.asp? var1=stuff&var2=morestuff',emailwin,width:300px;height:300px')

I am pretty new to ASP.NET.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top