HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 3rd, 2008, 10:34 AM
Guddu's Avatar
Guddu Guddu is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jul 2005
Location: Oxford UK
Posts: 2,978 Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 2 Months 1 Week 6 Days 10 h 41 m 10 sec
Reputation Power: 463
After 4 digits i want to put decimal

hi
i m trying to convert a number like 1234546 to 1234.56.meant after 4 digits i want to put decimal.actually i was trying this in xsl.but i not able to find any solution.so what i m thinking is writing a javascript function and call this into mu xsl.


thanks

shadow pls remove same thread from programming forum.
__________________
Nothing is Impossible bcoz IMPOSSIBLE itself says..
I M POSSIBLE........................
Be cool !!!!!!!!

Reply With Quote
  #2  
Old July 3rd, 2008, 10:51 AM
Wolffy's Avatar
Wolffy Wolffy is offline
Slaprentice of Wolves
ASP Free Beginner (1000 - 1499 posts)
 
Join Date: Aug 2007
Location: Mossville, IL
Posts: 1,467 Wolffy User rank is Colonel (50000 - 60000 Reputation Level)Wolffy User rank is Colonel (50000 - 60000 Reputation Level)Wolffy User rank is Colonel (50000 - 60000 Reputation Level)Wolffy User rank is Colonel (50000 - 60000 Reputation Level)Wolffy User rank is Colonel (50000 - 60000 Reputation Level)Wolffy User rank is Colonel (50000 - 60000 Reputation Level)Wolffy User rank is Colonel (50000 - 60000 Reputation Level)Wolffy User rank is Colonel (50000 - 60000 Reputation Level)Wolffy User rank is Colonel (50000 - 60000 Reputation Level)Wolffy User rank is Colonel (50000 - 60000 Reputation Level)Wolffy User rank is Colonel (50000 - 60000 Reputation Level)Wolffy User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 2 Weeks 2 Days 1 h 41 m 47 sec
Reputation Power: 519
I think you have an extra digit in your example. Is the number always going to be 6 digits? Or more likely 3-6, right? In theory, if you treat the number as a string for a moment, it's fairly easy. Something like the following pseudo-code
Code:
tempstr = RIGHT('000000' & CStr(number),  6)
number = CInt(tempstr) / 100

Yeah, that's not JS, but you get the idea.
__________________
Wolffy
------------------------
Opinions expressed are my own and do not necessity reflect those of any sane person. Any code provided is intended to be an example and is provided AS IS. Rework for your specific environment may be required. Void where prohibited by law. Not valid in California. Your mileage may vary. Not FDIC insured

Reply With Quote
  #3  
Old July 3rd, 2008, 11:11 AM
ChiefWigs1982's Avatar
ChiefWigs1982 ChiefWigs1982 is offline
Cunning Linguist
ASP Free Loyal (3000 - 3499 posts)
 
Join Date: Mar 2005
Location: I used to live at home, now I stay at the house
Posts: 3,358 ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)ChiefWigs1982 User rank is Captain (20000 - 30000 Reputation Level)  Folding Points: 50746 Folding Title: Beginner FolderFolding Points: 50746 Folding Title: Beginner FolderFolding Points: 50746 Folding Title: Beginner Folder
Time spent in forums: 1 Month 1 Week 3 Days 5 h 53 m 37 sec
Reputation Power: 291
Facebook
There is no need to do this in JS - Shadow, don't delete the other
thread. I've given you advice on how to do this guddu - if you're
not gonna follow it, that's your prerogative.
__________________
Support requests via PM will be ignored!
Route of Queue | The General FAQ Thread | HOW TO POST A QUESTION

Sign up with Matched.co.uk and earn up to £15 per website every month!


Reply With Quote
  #4  
Old July 3rd, 2008, 11:24 AM
Guddu's Avatar
Guddu Guddu is offline
Contributing User
ASP Free Frequenter (2500 - 2999 posts)
 
Join Date: Jul 2005
Location: Oxford UK
Posts: 2,978 Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Guddu User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 2 Months 1 Week 6 Days 10 h 41 m 10 sec
Reputation Power: 463
sorry chief i did not see your reply.pls remove this thread.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > After 4 digits i want to put decimal


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway