Quantcast
Channel: Splitting address field using the Split function which contains commas
Viewing all articles
Browse latest Browse all 6

Re: Splitting address field using the Split function which contains commas

$
0
0

Thanks for the reply. actually my problem is that I am not very good in javascript. So here is my from end javascript:

However, please note instead of "Address" the field is "Text1".

function GetDynamicTextBox(textboxValue, hiddenValue, tcolor) {
var width = document.getElementById("ctl00_MainContent_txtAddress").style.width;
return "<input name = 'Text1' type='text' value = '" + textboxValue + "' style='width:" + width + "; background-color:#" + tcolor + ";' />&nbsp;" +
"<input type='image' name='imgRemove' id='Image1' src='../images/cross_small01.png' onclick = 'RemoveTextBox(this)' /><input type='text' name='AddID' value = '" + hiddenValue + "'/>"
}

function AddTextBox() {

var thisAdd = document.getElementById("ctl00_MainContent_txtAddress");

if (thisAdd.value == 0) return false;

var div = document.createElement('DIV');
div.innerHTML = GetDynamicTextBox(document.getElementById("ctl00_MainContent_txtAddress").value, document.getElementById("<%=hfLdaID.ClientID%>").value, 'ffffff');
document.getElementById("targetDiv").appendChild(div);
document.getElementById("ctl00_MainContent_txtAddress").value = '';
}

So how do I add theArray.join('_') ?


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>