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
Solved

Dreamweaver, Spry and an Access database

Posted on 2010-11-19
6
601 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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

 

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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

838 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