![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#11
| |||
| |||
|
|
Would be able to for an example? |
#12
| |||
| |||
|
|
Would be able to for an example? Yes... u just need to be patient for a while.. am travelling. It's actually simple... but will give u an example. -- Happy Hacking, Gaurav Vaish http://www.mastergaurav.org http://webservices.edujini.in ------------------- |
#13
| |||
| |||
|
|
Would be able to for an example? Yes... u just need to be patient for a while.. am travelling. It's actually simple... but will give u an example. -- Happy Hacking, Gaurav Vaish http://www.mastergaurav.org http://webservices.edujini.in ------------------- |
#14
| |||
| |||
|
|
Frank, Here's what you can start with... input id='box1' type='text' onchange='validateValue(this)' onkeypress='return checkKey(this, event)' ... / JavaScript initialization of the text box (for last validated value): var box1 = getElementById('box1'); box1.validValue = -1; //Initial value Javascript functions: function checkKey(sender, e) { // Use this if you want to validate each key-press // Return true if you accept the character typed, false if you don't want to be accepted return true; } function validateValue(tb) { var value = tb.value; var setVal = tb.validValue; // The last stored valid value try { var intval = int.Parse(value); if(intval >= -170 && intval <= 170) { setVal = intval; } } catch { } tb.validValue = setVal; // This is for internal use tb.value = setVal; // This is what keeps changing as user types } For exact and advanved javascript, you may like to go to flashy places like www.dynamicdrive.com etc. -- Happy Hacking, Gaurav Vaish http://www.mastergaurav.org http://webservices.edujini.in ------------------- "Gaurav Vaish (EduJini.IN)" <gaurav.vaish.nospam (AT) nospam (DOT) gmail.com> wrote in message news:%23VkdatwgGHA.3496 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Would be able to for an example? Yes... u just need to be patient for a while.. am travelling. It's actually simple... but will give u an example. -- Happy Hacking, Gaurav Vaish http://www.mastergaurav.org http://webservices.edujini.in ------------------- |
#15
| |||
| |||
|
|
Does excuse, but where do I glue that code? My knowledge is very limited. |
#16
| |||
| |||
|
|
Does excuse, but where do I glue that code? My knowledge is very limited. He he. :-) This code can be added directly in the ASPX page. Where you need the ID, use it from the code-behind since it is there that you have access to the ClientID. -- Happy Hacking, Gaurav Vaish http://www.mastergaurav.org http://webservices.edujini.in ------------------- |
#17
| |||
| |||
|
|
Excuse, but I didn't get. |
#18
| |||
| |||
|
|
Hi Frank, Excuse, but I didn't get. Do a thorough study on HTML elements and events. If you still don't get, mail me (my email is in From header, remove the "nospam" parts)... but do study thoroughly for at least a couple of days. That would help you in the long run as well. It's actually very simple to study than to write a whole specific code for it. :-) -- Happy Hacking, Gaurav Vaish http://www.mastergaurav.org http://webservices.edujini.in ------------------- |
#19
| |||
| |||
|
|
Hi Frank, Excuse, but I didn't get. Do a thorough study on HTML elements and events. If you still don't get, mail me (my email is in From header, remove the "nospam" parts)... but do study thoroughly for at least a couple of days. That would help you in the long run as well. It's actually very simple to study than to write a whole specific code for it. :-) -- Happy Hacking, Gaurav Vaish http://www.mastergaurav.org http://webservices.edujini.in ------------------- |
#20
| |||
| |||
|
|
I don't have idea of how to work with scripts. A small sample page in vb.net would be an initial point. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |