RE: passing multiple CF values to a JavaScript variable

2004-04-14 Thread Ian Skinner
The concept that took me awhile to get my head around.You don't usually pass variables to _javascript_ in examples like this.If you need to truly pass variables to _javascript_ from CFML you need to use some kind of intermediary technology such as WDDX.But for what you seem to be trying to do, you

Re: passing multiple CF values to a JavaScript variable

2004-04-14 Thread Joy Holman
Hi Patric, I'll try to consolidate information I've provided so far. I'm not at work today so I can't generate the exact code, but I'll do my best to simulate it. Here goes: Purpose of the code: When a user clicks on a menu link (generated by the CF code prior to the user interaction), an

Re: passing multiple CF values to a JavaScript variable

2004-04-14 Thread Joy Holman
Hi Patric, I'll try to consolidate information I've provided so far. I'm not at work today so I can't generate the exact code, but I'll do my best to simulate it. Here goes: Purpose of the code: When a user clicks on a menu link (generated by the CF code prior to the user interaction), an

RE: passing multiple CF values to a JavaScript variable

2004-04-14 Thread Ian Skinner
I created the following test code and it runs just fine, I believe it does basically what you are asking code to do. HTH !--- Test Code --- cfscript aQuery = queryNew(menu_bmarkLink,menu_Text,menu_nonBmarkLink); tmp = QueryAddRow(aQuery,4); tmp =

Re: passing multiple CF values to a JavaScript variable

2004-04-14 Thread Joy Holman
So there was nothing wrong with my original code and I shouldn't have gotten an error saying that onClick didn't understand the CF variable #menu_bmarkLink#. Maybe it failed because there was no value for #menu_bmarkLink# when that variable was blank - which would be the case when the

RE: passing multiple CF values to a JavaScript variable

2004-04-14 Thread Ian Skinner
I think you might be right, when I added a row to my test query with a blank menu_bmarkLink it produced output such as this: lia ... > That is definitely incorrect syntax in the onClick property and my test threw a JS error, but it did not say anything about not understanding #menu_bmarkLink#

Re: passing multiple CF values to a JavaScript variable

2004-04-14 Thread Patric Stumpe
Joy, taht's what I think too. The code sample Dave provided does the same thing your code should render. That's why I thought you could provide a dump of your database query to see if it's serving unexpected data... Patric So there was nothing wrong with my original code and I shouldn't have

Re: passing multiple CF values to a JavaScript variable

2004-04-14 Thread Joy Holman
Thank you for testing that,Ian. I must have jumped to the wrong conclusion. I didn't expect that onClick would read the cfelse portion of my cfif when the condition was met for the menu_nonbmarkLink. I think you might be right, when I added a row to my test query with a blank menu_bmarkLink

Re: passing multiple CF values to a JavaScript variable

2004-04-14 Thread Joy Holman
I see.I'll definitely incorporate that strategy. Thanks, Patric. Joy Joy, taht's what I think too. The code sample Dave provided does the same thing your code should render. That's why I thought you could provide a dump of your database query to see if it's serving unexpected data...