Prev: questions
Next: ASP.NET App How to convert AVI to WMV
From: aspfun via DotNetMonster.com on 25 Feb 2010 11:47 How to convert a javascripts below to use in code behind form? <script type="text/javascript"> document.getElementById('Ok').disabled = true; setTimeout(function(){ document.getElementById('Ok').disabled = false; }, 15000); </script> Convert to: Dim strJScript As New StringBuilder strJScript.Append("document.getElementById('" + Ok.ClientID + "').disabled =true;") //help to convert below code: ------ setTimeout(function(){ document.getElementById('Ok').disabled = false; }, 15000); ------ ClientScript.RegisterStartupScript(Me.GetType(), "myCode", strJScript. ToString(), True) -- Message posted via http://www.dotnetmonster.com
From: Scott M. on 25 Feb 2010 13:13 Just do exactly what you did with the first chunk of code, embed it as a string in a StringBuilder and then send it to the client. There's really no "conversion" here at all, just sending client code to the client from the server. -Scott "aspfun via DotNetMonster.com" <u53138(a)uwe> wrote in message news:a42b47f47991d(a)uwe... > How to convert a javascripts below to use in code behind form? > > <script type="text/javascript"> > document.getElementById('Ok').disabled = true; > setTimeout(function(){ > document.getElementById('Ok').disabled = false; > }, 15000); > </script> > > Convert to: > > Dim strJScript As New StringBuilder > strJScript.Append("document.getElementById('" + Ok.ClientID + "').disabled > =true;") > > //help to convert below code: > > ------ > > setTimeout(function(){ > document.getElementById('Ok').disabled = false; > }, 15000); > > > ------ > ClientScript.RegisterStartupScript(Me.GetType(), "myCode", strJScript. > ToString(), True) > > -- > Message posted via http://www.dotnetmonster.com >
From: Alexey Smirnov on 25 Feb 2010 13:58 On Feb 25, 5:47 pm, "aspfun via DotNetMonster.com" <u53138(a)uwe> wrote: > How to convert a javascripts below to use in code behind form? > > <script type="text/javascript"> > document.getElementById('Ok').disabled = true; > setTimeout(function(){ > document.getElementById('Ok').disabled = false;}, 15000); > > </script> > > Convert to: > > Dim strJScript As New StringBuilder > strJScript.Append("document.getElementById('" + Ok.ClientID + "').disabled > =true;") > > //help to convert below code: > > ------ > > setTimeout(function(){ > document.getElementById('Ok').disabled = false; > > }, 15000); > > ------ > ClientScript.RegisterStartupScript(Me.GetType(), "myCode", strJScript. > ToString(), True) > > -- > Message posted viahttp://www.dotnetmonster.com Dim strJScript As String strJScript = "setTimeout(function() {document.getElementById('Ok').disabled = false;}15000);"
|
Pages: 1 Prev: questions Next: ASP.NET App How to convert AVI to WMV |