Hi all
take a look at http://www.beal-homes.com/test.asp
I have used the script below to split a field down at commas and then
created a new string
This works but after the first item there is a space where the comma used to
be, is there any way I can remove this?
Thanks
Matt Houldsworth
<script language="javas cript">
var devText="<%=(ho uses.Fields.Ite m("location").V alue)%>";
function getDevelopments () {
var input = devText.split(" ,");
var input2 = new String();
for (var i = 0; i<input.length ; i++) {
input2 += "<a
href='home_temp late.asp?id=<%= (houses.Fields. Item('id').Valu e)%>&titleofdev e
lopment=" + input[i] + "'>" + input[i] + "</a>" +"<br>";
} document.all("d ev").innerHTM L = input2;
}
</script>
take a look at http://www.beal-homes.com/test.asp
I have used the script below to split a field down at commas and then
created a new string
This works but after the first item there is a space where the comma used to
be, is there any way I can remove this?
Thanks
Matt Houldsworth
<script language="javas cript">
var devText="<%=(ho uses.Fields.Ite m("location").V alue)%>";
function getDevelopments () {
var input = devText.split(" ,");
var input2 = new String();
for (var i = 0; i<input.length ; i++) {
input2 += "<a
href='home_temp late.asp?id=<%= (houses.Fields. Item('id').Valu e)%>&titleofdev e
lopment=" + input[i] + "'>" + input[i] + "</a>" +"<br>";
} document.all("d ev").innerHTM L = input2;
}
</script>
Comment