SoftwareTipsPalace.com: Newsletter | YouTube Channel | Write for Us | RSS/XML  

 

advertisement
Home Windows Apple/Mac Linux Reviews Guides/Tips How-To Techs/Tests Web 2.0 Downloads Videos Blogs/News Forums
Submit your Tips/Guides | Discuss about Tips/Guides | Latest Added | Recommended Tips/Guides | Subscribe to Tips/Guides RSS
{feature}
+ Advanced Search
+ Suggest a website
no user avatar Welcome, Guest. Please login or register.

advertisement

More Dreamweaver Guides/Tips
Create a custom submit button
Specify template editable regions
Management of Links
Setting table properties in Macromedia Dreamweaver MX 2004
Steps to Making your Site Live

 

 » Choose Section

advertisement
Review Downloads Guides/Tips News  

Column Dreamweaver - Framework Spry: Spry.Utils.updateContent function

By: Staff
Date: August 06, 2007
Recommended by: readers | recommend tip
Level: Advanced

The Spry.Utils.updateContent function makes the update of the content without the necessity to be recharging the page; it makes the simulation of a iframe. To use the Spry.Utils.updateContent function and necessary to declare four arguments, being the first a id of the Div where the page goes to be loaded, as the argument is the URL of the page, the third argument is for a function to function later that the page is loaded and the room argument is for some arguments special. We will only use the two first ones.

Create a new page, it can be of any type, with the safe page we go to include the SpryData.js archive of the Frameworks Spry of tag inside Head

<script language="javascript" type="text/javascript" src="SpryData.js"></script>

Now we go to use the Spry.Utils.updateContent function together with the function onLoad inside of tag Body, indicating which page will be loaded initially

<body onload="Spry.Utils.updateContent('id_da_div','pagina_inicial.html');">

We go to add links and the Spry.Utils.updateContent function together with the function onClick so that when the using click in link the Spry.Utils.updateContent function makes update of the page inside of div informed.

<a href="#" onclick="Spry.Utils.updateContent('id_da_div','pagina_1.html');"> Link 1 </a>
<a href="#" onclick="Spry.Utils.updateContent('id_da_div','pagina_2.html');"> Link 2 </a>
<a href="#" onclick="Spry.Utils.updateContent('id_da_div','pagina_3.html');"> Link 3 </a>

Now we go to create div where the Spry.Utils.updateContent function will load the page

<div id="id_da_div"></div>

The final code is this:

<html>
<head>
<title>Funnção Spry.Utils.updateContent</title>
<script language="javascript" type="text/javascript" src="/includes/SpryData.js"></script>
</head>
<body onload="Spry.Utils.updateContent('id_da_div','pagina_inicial.html');">
<h3>Funnção Spry.Utils.updateContent</h3>
<p>
<a href="#" onclick="Spry.Utils.updateContent('id_da_div','pagina_1.html');"> Link 1 </a>
<a href="#" onclick="Spry.Utils.updateContent('id_da_div','pagina_2.html');"> Link 2 </a>
<a href="#" onclick="Spry.Utils.updateContent('id_da_div','pagina_3.html');"> Link 3 </a></p>
<div id="id_da_div"></div>
</body>
</html>

That would be all for this tip. More tips on working with spry options expect soon.

 

 

email this to a friend | forum discuss
Adobe Dreamweaver Review | Dreamweaver Guides/Tips | Dreamweaver Downloads | Dreamweaver Forums | Adobe Blog

 

 

{feature}
{feature}
logo SoftwareTipsPalace.com : Newsletter | Email Signup | Guides, Tips, Tricks | YouTube Channel | subscribe to our rss

WebSite Links: Home | Forums | Blog | Web Mail | Windows | Software Reviews | How-To Features | Techs & Tests | Web 2.0 Reviews | Downloads

About Us | Privacy Policy | Terms of Use | Advertising Info | Contacts | FAQ's | Write for Us

{feature}