×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

input values are truncated

input values are truncated

input values are truncated

(OP)
I provided a solution for a VBS thread regarding fraction simplification - thread329-1697266: Creating a Fraction Simplifying Calculator. The solution accepts two values and simplies them as if they were the nominator and the denominator; works beautifully when run as a VBS. However, when implemented into an HTML, the values are read properly but processed in a truncated form. What gives!?

Example
A: 5 B: 25, read as 5 and 25 but processed as 5 and 2
A: 11 B: 4, read as 11 and 4 but processed as 1 and 4
A: 4867 B: 7, read as 4867 and 7 but processed as 4 and 7

You can see how this can present a HUGE problem. Here is a simplified cut/paste ready instance that demostrates the "error"

CODE

<html>
	<script language="vbscript"> 
		sub process()
			a = txt1.value
			b = txt2.value
			if (a > b) then
				msgbox "Apple"
			else
				msgbox "Banana"
			end if
		end sub
	</script> 
	
	A: <input id="txt1" type="text" value=""/><br>
	B: <input id="txt2" type="text" value=""/><br>

	<input type="button" value="Simplify Fraction" onClick="process()"/>
</html> 

-Geates

http://raqxtr.sstar.com/caspdoc/html/chapter_5__de...

RE: input values are truncated


Hint: String value "7" is greater than string value "4867"


Mark

"You guys pair up in groups of three, then line up in a circle."
- Bill Peterson, a Florida State football coach

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close