473,383 Members | 1,980 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

DHTML>DOM_JS passing vars 2x question

Magdelana
Hello

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
  1. function startEditing(trObj,a,b) {
  2.     var arrColumnNames = getColumnNames(trObj.parentNode.parentNode);
  3.     var tdObjs = trObj.getElementsByTagName('TD');
  4.     tdObjs[0].innerHTML = '<a class="save" href="#" onclick="saveRecord(this,a,b);" 
  5.  
  6.  
  7. function saveRecord(obj,a,b) {
  8.       var url = tableObj.id;
  9.  
  10.        url += '.cfc?method=add';
  11.     for (var i=0;i<inputObjs.length;i++)
  12.         url += '&' + inputObjs[i].name + '=' + inputObjs[i].value;
  13.         // set the owner and level
  14.         url += '&ownerid=' + b;
  15.         url += '&levelid=' + a;
  16.       var response = wddxGetElement(httpRequest(url),'string')
Oct 13 '07 #1
2 1097
I fig'd this out I need more wee ' around a and b
Oct 13 '07 #2
gits
5,390 Expert Mod 4TB
hi magdalena,

glad to hear you find it out for yourself ... but a little hint ... ;)

in case you use our CODE-tags around your code ... you will notice such small syntax errors very easy ... i've added them to your first post ... and have a look at it ... you will see :) ...

usage:

[CODE=javascript] your code here [/code]

kind regards
Oct 15 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ron Lounsbury | last post by:
I have a customer who has requested that I add "popup" text (a la ToolTips) to a couple of pulldown lists in a DHTML form we have in our project. He says - Just use the ALT tag. I went and double...
4
by: Kerri | last post by:
Hi, I have a span as below. <span id="lblTest" style="color:#FF0033;font- weight:bold;">This is a test.</span> When the user clicks a checkbox I call below code to set my span text to...
2
by: Matthew | last post by:
Hello! What is the best NS/IE compliant way to accomplish this using the least amount of javascript code? <div id="block1"> Group 1 Code </div> <div id="block2"> Group 2 Code </div>
44
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to...
9
by: Wang, Jay | last post by:
Hello, all, I would like to enable some text between <SPAN url="http://www.testserver.com/">WORD TO BE DRAGGED </SPAN>. I put some javascript and it will extract http://www.testserver.com/ from...
2
by: Joachim Bauer | last post by:
I'm using the code below to display a menu that opens when the mouse goes over the main menu item (try it in your browser to understand the behaviour). It uses "position:absolute" and a switch...
4
by: Guillaume CABANAC | last post by:
Hi everybody, Does anybody know how to access a remote database (say Oracle) from JavaScript code (within a Firefox Extension) ? I know ADO via ActiveX in the IE world and think a similar...
6
by: Jon Davis | last post by:
I recently learned how to do an <OBJECT> alternative to <IFRAME> in current browsers using: <object id="extendedhtml" type="text/html" data="otherpage.html" width="250" height="400"></object> ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.