Solved

Dreamweaver, Spry and an Access database

Posted on 2010-11-19
6
602 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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