close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

button changes colour with show regions

Thread began 1/09/2010 8:42 pm by mr hankey | Last modified 2/23/2010 7:27 pm by Eric Mittman | 1244 views | 8 replies |

mr hankey

button changes colour with show regions

hi,

i am looking to have multiple results hidden on my page with a heading for each table to display.

basically they would click on the button and it would show that results however i want the button to be a certain colour if there is no data in the table so the user knows at a glance there is no point in clicking on button as no data will show and another colour when data is there to display.

hope someone can help i am sure this is a simple fix wuth dreamweaver but just getting my head around it.

many thanks

Sign in to reply to this post

CraigRBeta Tester

possible solution

how's about using the show region server behavior with appropriate button if recordset is empty and different button if recordset is not empty

Sign in to reply to this post

mr hankey

thanks mate for that,will that work with an accordian style effect menu where the content shows the details of a client?

so click on the link if it is a colour that say shows it has data, they click and it shows the products sold to the client?

many thanks

Sign in to reply to this post

mr hankey

can you have multiple recodsets on a page for this to work?

cheers

Sign in to reply to this post

Eric Mittman

When you use a show region you will need to specify a recordset to be based on. You can use this method to show one button if the recordset is empty, then show a different button if it is not empty. You can have multiple recordsets and show regions on the same page.

If you want to get this working with an according effect you should get that part onto the page and functioning how you would like it first. Then you can apply the show regions to show either the button with the according area or the other button.

Sign in to reply to this post

mr hankey

thanks eric,

so workflow is:

1.accordian effect
2.recordsets
3.show regions

thanks again mate

Sign in to reply to this post

Eric Mittman

Let us know if you have any problems with the show regions once you have the accordion effect and recordsets in place.

Sign in to reply to this post

mr hankey

hi eric,

thanks for your help with this, i have the spry tabs effect in place now along with the recordsets and a repeating table in the content area of the tabs which shows if recordset is not empty.

this works fine however the tabs themselves i have as blue but i want it to be red if the recordset is empty how could i change this?

also eric i have created a page where the user can add a company name with product desciption which inserts fine into database.

how can i get it to take the product description and add into into a new tab automatically with a recordset creating from it along with an insert form?

i know the second one might be alot of hand coding so if it is tricky i might just change that page to a drop down menu and bind the menu to the product description column of that table but thought i would ask you anyway :)

thanks

Sign in to reply to this post

Eric Mittman

In order to change the color depending on weather or not the rs is empty you can use php to dynamically add in a style like this:

php:
if($totalRows_<your rs> <= 0) print("style='background-color:red;'");



This would go in directly into the tag for the accordion tab.

As for the second thing you are asking about I'm not very clear on what you are looking to accomplish. It would be a good idea to explain how things should work from the perspective of the user that will be interacting with this. I think this should give me a better understanding of the situation and what may need to be done.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...