Substring in Javascript

Posted by Rajarbind under ASP.NET on 7/3/2008 | Views : 2121 | Status : [Member] | Replies : 1
Hello,
I have a string value like [time].[school year],[district].[district name]. So i want to get the value after ',' meanse [district ]. [district name]. how to use substring with ,. plz help me
Arbind.




Responses

Posted by: SheoNarayan on: 7/3/2008 [Administrator] HonoraryPlatinum

Up
0
Down
Use split function

var RoleIDArray;
RoleIDArray = tempStering].split(",")

var districtName = RoleIDArray[1];

Hope this helps

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Rajarbind, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response