embedded javascript
-
hi. in a composite control there is a textbox & a embedded javascript file. i want to access textbox at client side in embedded javascript file as: var TxtBx = document.getElementById('<%= this.TextBox1.ClientId %>'); but this raises error. can any tell me where am i wrong?
-
hi. in a composite control there is a textbox & a embedded javascript file. i want to access textbox at client side in embedded javascript file as: var TxtBx = document.getElementById('<%= this.TextBox1.ClientId %>'); but this raises error. can any tell me where am i wrong?
Try something like this: var TextBox1 = $get('<%=TextBox1.ClientID%>'); alert(TextBox1.value); Hope it helps u...
-
hi. in a composite control there is a textbox & a embedded javascript file. i want to access textbox at client side in embedded javascript file as: var TxtBx = document.getElementById('<%= this.TextBox1.ClientId %>'); but this raises error. can any tell me where am i wrong?
What's the error ? Is this in the aspx, or in a js file ? js files are not parsed by ASP.NET, nor are they in scope of your control.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Try something like this: var TextBox1 = $get('<%=TextBox1.ClientID%>'); alert(TextBox1.value); Hope it helps u...
I doubt this will work if what he posted is not working.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Try something like this: var TextBox1 = $get('<%=TextBox1.ClientID%>'); alert(TextBox1.value); Hope it helps u...
-
I doubt this will work if what he posted is not working.
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )