Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Dreamweaver, Spry and an Access database

Posted on 2010-11-19
6
Medium Priority
?
621 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
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

 

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 2000 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

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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

598 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