Hey Spike,
Hope your well, been a long time 
Ok, i did try what you suggested as it would seem to be the easiest way to do it, a simple replace i thought would do the trick.
But that didn't seem to work it still populated the input element with the £ symbol so i tried a length - 1 which only worked for positive numbers.
I might as well show you the full example. I have 2 fields Sales and Fixed like so:
Code:
<input Name="SalesPercent" maxlength="6"> -
<input Name="SalesFixed" maxlength="6">
Above this there is a form selecting all of the fields from a table, each having an Edit button. When the edit button is clicked it fires the following function:
Code:
function Edit(intID) {
var form = document.forms[1];
var data = document.getElementsByTagName("td");
var valSalesFixed = "";
var fixOrPerc = data["Sales-" + intID].innerHTML;
if (data["Sales-" + intID].innerHTML.indexOf("%") >= 0) {
form.SalesPercent.value = data["Sales-" + intID].innerHTML.replace("%", "");
} else {
form.SalesFixed.value = fixOrPerc.substring(1, fixOrPerc.length - 1);
}
}
Now i have just tried putting in your code but that doesn't work either
Bookmarks