By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,678 Members | 2,192 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,678 IT Pros & Developers. It's quick & easy.

Format Textbox on exit to Currency

P: n/a
I am new to ASP/VBScript and I am trying to format a texbox when a
user exits it. In Visual Basic you could put the following in the Exit
property of the textbox:

textbox1 = Format(textbox1, "Currency")

Is this possible in ASP/VbScript? Any help appreciated. Please show
code in your reply, especially where to put this code in the asp page?
Thanks.
Jul 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
You could use client-side JavaScript, with an onblur() event.

<input type=text onblur='someFunction(this);'>

Please follow up in a client-side group for more information.


"Patrick J. Schouten" <ps***********@hotmail.com> wrote in message
news:1b**************************@posting.google.c om...
I am new to ASP/VBScript and I am trying to format a texbox when a
user exits it. In Visual Basic you could put the following in the Exit
property of the textbox:

textbox1 = Format(textbox1, "Currency")

Is this possible in ASP/VbScript? Any help appreciated. Please show
code in your reply, especially where to put this code in the asp page?
Thanks.

Jul 19 '05 #2

P: n/a
Patrick J. Schouten wrote on 13 jul 2003 in
microsoft.public.inetserver.asp.general:
I am new to ASP/VBScript and I am trying to format a texbox when a
user exits it. In Visual Basic you could put the following in the Exit
property of the textbox:

textbox1 = Format(textbox1, "Currency")

Is this possible in ASP/VbScript?


No, it has a

FormatCurrency Function
FormatNumber Function

see:

<http://msdn.microsoft.com/library/
en-us/script56/html/vsfctformatnumber.asp>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #3

P: n/a
There is a format currency function in VBScript also. But
the thing you are missing is that in order to use that in
your asp server-side code, you will have to submit the
form first. It is possible to use VBScript on the client-
side, but that is only advisable if you have control over
the browser the users are using. IE with VBScript
enabled. In that case u can write script tags with the
appropriate calls to your vbscript code. like this:

u can call a function
<input type="text" name="blah" onBlur="FormatThis(this);">

or call the FormatCurrency function
<INPUT type="text" name="blah"
onBlur="VBSscript:FormatCurrency(no reference handy)">
GL
-----Original Message-----
Patrick J. Schouten wrote on 13 jul 2003 in
microsoft.public.inetserver.asp.general:
I am new to ASP/VBScript and I am trying to format a texbox when a user exits it. In Visual Basic you could put the following in the Exit property of the textbox:

textbox1 = Format(textbox1, "Currency")

Is this possible in ASP/VbScript?


No, it has a

FormatCurrency Function
FormatNumber Function

see:

<http://msdn.microsoft.com/library/
en-us/script56/html/vsfctformatnumber.asp>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
.

Jul 19 '05 #4

P: n/a
Thanks. Looks like I have a bit to learn about ASP. I am still trying to
get the hang of "server side" and "client side" scripts. Thanks for the
help.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.