Solved

Dreamweaver, Spry and an Access database

Posted on 2010-11-19
6
600 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

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 tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

776 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