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
Expand|Select|Wrap|Line Numbers
- func1 {
- .......
- document.getElementById('inlineEdit_'+recid).innerHTML += '<a onClick="cancelEdit('+recid+','+ count_sqlChangeSet+','+currpage+','+varval+')" class="revertEditing" title="Cancel" id="revert"><img src="http://bytes.com/images/cancel.gif" border="0" /></a>'
- ...... }
Expand|Select|Wrap|Line Numbers
- 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