Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 31, 2012 02:09 AM by kedarrkulkarni
Member
117 Points
542 Posts
Dec 31, 2012 12:40 AM|LINK
Hello, I have this fucntion which will display a data in a popup. The data is viewed perfectly, but now I want to reduce the data viewed to only 3 characcters, how can I do this? This is my code:
string updateValuesScript = @"function updateValues(popupValues) { document.getElementById('lblFirstName').innerHTML=popupValues[0]; }";
All-Star
34013 Points
5468 Posts
Dec 31, 2012 02:09 AM|LINK
try this
string updateValuesScript = @"function updateValues(popupValues) { document.getElementById('lblFirstName').innerHTML=popupValues[0].substring(0,3); }";
hope this helps...
colol
Member
117 Points
542 Posts
How can I display only the first three words of a string?
Dec 31, 2012 12:40 AM|LINK
Hello, I have this fucntion which will display a data in a popup. The data is viewed perfectly, but now I want to reduce the data viewed to only 3 characcters, how can I do this? This is my code:
string updateValuesScript = @"function updateValues(popupValues) { document.getElementById('lblFirstName').innerHTML=popupValues[0]; }";kedarrkulkar...
All-Star
34013 Points
5468 Posts
Re: How can I display only the first three words of a string?
Dec 31, 2012 02:09 AM|LINK
try this
string updateValuesScript = @"function updateValues(popupValues) { document.getElementById('lblFirstName').innerHTML=popupValues[0].substring(0,3); }";hope this helps...
KK
Please mark as Answer if post helps in resolving your issue
My Site