Richard,

I appears that you're using JQuery so some of your questions might be  
more appropriate on the forums over there, but a couple of things:

You need to pass the pound symbol in with your field so that JQuery  
knows to specifically to look for an HTML element with that id  
attribute:

$('#columnID').value=columnIDsArray;

If it's an existing javascript object variable, than there's no need  
to quote it:

var columnID = document.getElmentById("columnId");
$(columnId).value=columnIDsArray;

I'm not exactly sure what the execution plan and fallback for JQuery  
is when the pound sign is missing.  Rey Bango would probably know, but  
it's a good bet that this may be the problem.  By using  
"document.manageLookupForm.columnID.value" you are bypassing the  
JQuery lookup of the object and accessing the DOM tree directly.

In any case, I'm not sure that populating your forms with javascript  
on each step is the most effective or efficient way.   Javascript and  
a JQuery are wonderful for manipulating stuff after the document has  
loaded, but server side code can make quick and accurate work of it  
like in this (very basic) example of using the passed form structure  
to quickly populate required fields:

<cfset reqFields = "name,author,title,text">
<cfloop list="#reqFields#" index="i">
<input type="hidden" name="#i#" id="#i#"<cfif structKeyExists(form,i)>  
value="#form[i]#<cfelse> value=""</cfif>/>
</cfloop>

You can make short work of handling the passed variables and don't  
have to rely on the browser to make sure the values are set correctly.

Just my 2 cents.


-Jon


On Dec 9, 2007, at 3:23 PM, Richard White wrote:

> ok after nearly tearing my hair out all day i still dont know what  
> was wrong but managed to fix it. if i was to set the value of the  
> hidden form fields as follows:
>
> $('columnID').value = columnIDsArray;
>
> then it was working sometimes and not others, yet if i set it as  
> follows:
>
> document.manageLookupForm.columnID.value = columnIDArray;
>
> then it works all the time????
>
> does anyone have any idea why this would happen.
>
> i have the first way set up on all my interfaces and works fine but  
> on this interface like i said it works fine with the second way but  
> not the first?
>
> thanks


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294426
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to