Information Systems
Home Products QA Support Contact

Why doesn't split work in my String after = id.value?


If you do something like:

var s = document.getElementById("field");

var sa = s.split(".");

It won't work. s is not a string at that point. Try:

var s = new String(document.getElementById("field"));

Copyright 2010, Omnicode Inc. Omnicode is a registered trademark of Omnicode Inc.