I have a startEditing function that has to "build" a href call to another function and pass 2 vars (a,b)
They are in this function ( I can print them out), but I get an "a is not defined"
when I click the saverecord href function I just built. what am I doing wrong?
Expand|Select|Wrap|Line Numbers
- function startEditing(trObj,a,b) {
- var arrColumnNames = getColumnNames(trObj.parentNode.parentNode);
- var tdObjs = trObj.getElementsByTagName('TD');
- tdObjs[0].innerHTML = '<a class="save" href="#" onclick="saveRecord(this,a,b);"
- function saveRecord(obj,a,b) {
- var url = tableObj.id;
- url += '.cfc?method=add';
- for (var i=0;i<inputObjs.length;i++)
- url += '&' + inputObjs[i].name + '=' + inputObjs[i].value;
- // set the owner and level
- url += '&ownerid=' + b;
- url += '&levelid=' + a;
- var response = wddxGetElement(httpRequest(url),'string')