>
>houseDetails = {address : "1970 ST CHESTER AURORA, 80010",      price :
>"45000",listingNum : "833553", office : "303-487-0777" };
>

>
>The returned info (price, for example) displays great with ID numbers
>in a table as such: <td id="price"></td> or  like this <p
>id="price"></p>...  but how the heck do I use it in a URL and (most
>importantly) pass other variables with it, for example: <a
>href="?from=doit&price=PRICEVARIABLEHERE"> and have that link info
>change without refresh right along with the rest of the page?
>

Using javascript you can access the json as a structure; houseDetails.price 
returns 45000.
So basically once the dataset is returned you can use it to build your url 
string.It really helps to use a framework or library that is meant to work with 
json and ajax. Try prototype or jquery.

I can write the following:

document.createElement("a").href="index.cfm?price="+houseDetails.price;


You can also access elements by their id or relative position to other easily 
accessed elements in jQuery or Prototype

So really if your dev guy is a good client side developer, you should handle 
all of the cfc methods for him and have him do all of the javascript and client 
side development. Or are you trying to learn how to write javascript? 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332396
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to