call server side function then javascript
- From: "Lostdante via DotNetMonster.com" <u12359@uwe>
- Date: Wed, 18 Jan 2006 11:33:33 GMT
Hi,
I have a modal dialog box which i'm using to collect user data. what I want
to do is when the user clicks the 'submit' button add the data to the
database and then call the java script to close the window and pass a value
back to the parent page.
I've tried using RegisterStartupScript after the database update function but
this doesn't seem to work. Any help would be great.
Rob.
Code is:
'add data to db
addAction()
'close window
Dim strScript, strKey
strKey = "AddAction"
strScript = "<script language=JavaScript>window.returnValue = document.
getElementById('txtlbID').value; window.close();</script>"
Page.RegisterStartupScript(strKey, strScript)
--
Message posted via http://www.dotnetmonster.com
.
- Follow-Ups:
- Re: call server side function then javascript
- From: Kevin Spencer
- Re: call server side function then javascript
- Prev by Date: Re: Gridview Formatting is poor.
- Next by Date: ASP.NET SMTP Email issue with IIS 6.0 on Win Server 2003
- Previous by thread: Gridview Formatting is poor.
- Next by thread: RE: call server side function then javascript
- Index(es):