Solved

Dreamweaver, Spry and an Access database

Posted on 2010-11-19
6
598 Views
Last Modified: 2012-06-27
I want to add text and images to an acess 2010 database and have these linked to a spry accordian menu in Dreamweaver so that the accordian is dynamic.  How do I do this?
0
Comment
Question by:Dier02
  • 3
  • 2
6 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 34178525
Hi again Dier02,

Can you be more specific about how you expect the application to work?
0
 

Author Comment

by:Dier02
ID: 34178535
I want to be able to change what shows up in the Spry by linking each section of the accordion menu to a database item - the picture is linked to a picture item in an access database and the text can be changed in a table entry.  Does that sound right?
0
 
LVL 10

Expert Comment

by:stu215
ID: 34639801
Do you have PHP, Perl, or Coldfusion?

You would write a loop to create the tabs for your menu from a DB query using a scripting language.

Another option could be to use XML files instead of an access database and to create the tabs / content using
spry data regions.

0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:Dier02
ID: 34651639
The latter sounds good but how would I do that?
0
 
LVL 10

Expert Comment

by:stu215
ID: 34655432
Here is a tutorial on XML:
http://www.w3schools.com/xml/default.asp

Its very similar to HTML with tags, but XML will not work at all unless ALL your tags match up.

Here is a link to Adobe's sample on XML & Spry Data Regions:
http://labs.adobe.com/technologies/spry/articles/data_set_overview/

Note: You can export from Excel to XML format & I am pretty sure you can save your data from Access directly into an XML file as well.  

Lemme know if you have any Q's.
0
 
LVL 10

Accepted Solution

by:
stu215 earned 500 total points
ID: 34655650
Eventually your page should look something like ( This is just pseudocode ):

Note: You would replace the table with the code for the accordion so it creates the tabs within the dynamic region

<!--Link the Spry libraries-->
<script type="text/javascript" src="includes/xpath.js"></script>
<script type="text/javascript" src="includes/SpryData.js"></script>

<!--Create a data set object-->
<script type="text/javascript">
	var dsSpecials = new Spry.Data.XMLDataSet("data/cafetownsend.xml", "specials/menu_item");
</script>

<!--Create the Spry dynamic region-->
<div id="Specials_DIV" spry:region="dsSpecials">
	<!--Display the data in a table-->
	<table id="Specials_Table">
		<tr>
			<th>Item</th>
			<th>Description</th>
			<th>Price</th>
		</tr>
		<tr spry:repeat="dsSpecials">
			<td>{item}</td>
			<td>{description}</td>
			<td>{price}</td>
		</tr>
	</table>
</div>

Open in new window



Using the accordion instead ot the table would look something like:
<div id="Accordion1" class="Accordion" spry:region="dsSpecials>
	<div class="AccordionPanel" spry:repeat="dsSpecials">
		<div class="AccordionPanelTab">Panel 1</div>
		<div class="AccordionPanelContent">
			Panel 1 Content<br/>
			Panel 1 Content<br/>
			Panel 1 Content<br/>
		</div>
	</div>
</div>

Open in new window

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now