|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Need Simple Help
I WANT MY TEXTBOX TO ACCEPT ONLY NUMBERS.
This script works fine, but.. what to do if I want to check more textbox ??? The input name of the textbox is <input name="str" I want to "add str+agi+vit+nrg" textboxes Here is my script: (please edit it) Quote:
|
|
#2
|
||||
|
||||
|
Quote:
See here ![]() First off... the "name" attribute for form input elements isn't for selection, rather its so that server-side scripts can identify incoming information (in a nutshell) To uniquely identify elements, you're supposed to use the "id" attribute Your script is also missing a lot of EOL characters That aside, I have no idea what it is you want the script to do Any chance you can articulate yourself in a more coherent manner? |
|
#3
|
||||
|
||||
|
Quote:
If this is your script then I would assume you know what it does and therefore how to change it to do what you want. If you have copied the script with no understanding of what it does I suggest you do some research into javascript validation functions, or as this is an ASP forum maybe look into VBScript IsNumeric functions.
__________________
-
thought-after | my thoughts on web development Get Firefox, the developers browser Budget hosting - recommended [/left] |
|
#4
|
||||
|
||||
|
Quote:
And leave 25% of non-VBS enabled browsers out in the cold ![]() |
|
#5
|
||||
|
||||
|
mmmmm ..... picky
![]() |
|
#6
|
|||
|
|||
|
Please Help Me with This Simple Question
I'm green at javascripts...
Help me to make more numeric textboxes... My script checks only 1 "str" textbox.. How to add more ??? |
|
#7
|
||||
|
||||
|
add more html:
<input type=text> to add more text boxes on the screen. |
|
#8
|
||||
|
||||
|
Quote:
Correction <input type="text" id="textinput2" name="textinput2" /> There ![]() |
|
#9
|
||||
|
||||
|
hmm...
I wonder what will happen if he adds this: <input type crash> ![]() j/k |
|
#10
|
||||
|
||||
|
neither type nor crash are flag attributes (all of which are depreciated anyway)
So nothing would happen.... because the required attribute "type" wasn't specified properly, you would get either a blank text input box, a hidden field, or a non-rendered element depending upon which agent is rendering the markup. Of course, if you want to crash a browser.... specifically, an M$IE browser, use the following code Code:
<script language="VBScript">
Dim i
i = 0
Do While i < 1
Document.Write("haha")
Loop
</script>
Enjoy ![]() |
|
#11
|
||||
|
||||
|
lol
the <input type crash> is actually crashing IE6, at least in my Windows2000 machine over here. moreover, my Norton Antivirus detected the html file with this line (which I wrote!) as virus!! (Trojan.CrashIE virus) LMAO! ![]() |
|
#12
|
||||
|
||||
|
Google for it
You'll see its just a bug in IE, probably written in deliberatly by some disaffected or disgruntled employee |
|
#13
|
||||
|
||||
|
bug or no bug, it caused my browser to crash.
and it's identified as virus. reason who caused it or why is irrelevant... ![]() |