change instance color from database query?

  • wgardens
  • Born
  • Born
  • wgardens
  • Posts: 1

Post 3+ Months Ago

I want to change the color of a button on a page by reading in a database entry, and also have the button call a particular URL using it's instance name as part of the URL

my starting file is at:

I'm starting to create an interactive map for a client which I want to accomplish several things. The client has a cold fusion site which allows him to enter lot numbers for sale, the price, and whether that lot has sold or not. currently the community has 341 lots - about 30 are available.
I'm planning on making each lot a button, with an instance name consisting of the lot number itself. I have a cfm page created which gives me the following output from the database:


I have the folling code attached to each button:
on (release)
loadVariables ("", this);

where "248" is replaced by the actual lot number. Can I change that dynamically based on the instance name? Also, if the "getinfo.soldyesno" returns a "Yes," I want to be able to change the color of the button to red to indicate visually that it's sold.

Can anybody help?

For reference, the following script on my main timeline:

CurrentRecord = 0;
loadVariables ("", this);
strLotPrice = Price;
strLotNumber = LotNumber;
strPosition = "Record " add String(CurrentRecord+1) add " of " add String(TotalRecords);


Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 5 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.