Re: call server side function then javascript

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Have you looked at the client-side HTML that is in the browser to see
whether or not your JavaScript is there?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.

"Lostdante via DotNetMonster.com" <u12359@uwe> wrote in message
news:5a89d3801f9e7@xxxxxx
> 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


.


Quantcast