Hi,
A js file containing a function which is passing an alphanumeric string to another function in the same file, the second funtion requires 4 parameters to pass from the first function.
The first three are the number and the last one is the alphanumeric string , but when I apply the fourth parameter , it throws out an error Expected';'
The value in the varval parameter are like '2 xyz', '4 abc'
The calling fucntion is being called link this
Under is the called function
Please help..
Shalabh
A js file containing a function which is passing an alphanumeric string to another function in the same file, the second funtion requires 4 parameters to pass from the first function.
The first three are the number and the last one is the alphanumeric string , but when I apply the fourth parameter , it throws out an error Expected';'
The value in the varval parameter are like '2 xyz', '4 abc'
The calling fucntion is being called link this
Code:
func1 {
.......
document.getElementById('inlineEdit_'+recid).innerHTML += '<a onClick="[B]cancelEdit[/B]('+recid+','+ count_sqlChangeSet+','+currpage+',[B]'+varval+'[/B])" class="revertEditing" title="Cancel" id="revert"><img src="http://bytes.com/images/cancel.gif" border="0" /></a>'
...... }
Code:
function cancelEdit(recid,count_sqlChangeSet,currpage,changeSetNo)
{ //changeSetNo = '2 xyz';
alert(changeSetNo);
document.getElementById('inlineEdit_'+recid).innerHTML = '<a onclick="inlineedit('+recid+','+ count_sqlChangeSet+','+currpage+')" >Inline Edit</a>'
document.getElementById('changeSetNo_'+recid).innerText = changeSetNo;
}
Shalabh
Comment