Solved

Is it possible to combine SPRY widgets?

Posted on 2008-10-07
3
430 Views
Last Modified: 2010-04-21
Hi I would like to combine the Spry.Utils.setInnerHTML with Spry.Effect.Fade.

I have a form which when submit, it will load another page instead of the form itself. On submit, the form will call validateonsubmit()
      function updateResponseDiv(req)
      {
            Spry.Utils.setInnerHTML('response_form1', 'confirm.html');
            document.getElementById('form1').reset();
      }
      function validateonsubmit(form){
                  if (Spry.Widget.Form.validate(form) == true){
                        Spry.Utils.submitForm(form, updateResponseDiv);
                  }
            return false;
      }

Is it possible to use the Spry.Effect.Fade so that the new page (confirm.html) will fade in?
Thanks.
0
Comment
Question by:Rassac
3 Comments
 
LVL 7

Accepted Solution

by:
shirazti earned 500 total points
ID: 22676687
Hi Rasaac,

Use Spry.Utils.updateContent to load another page within a div.

Check the code snippet
code requires following javascript files
SpryData.js, SpryEffects.js, SpryUtils.js
http://labs.adobe.com/technologies/spry/includes/SpryData.js
http://labs.adobe.com/technologies/spry/includes/SpryEffects.js

*Q_23799428 : do the same thing Spry.Utils.updateContent('div', ''fading.html');
requires SpryData.js
function updateResponseDiv(req){
	Spry.Effect.DoFade('response_form1',{ duration: 500, from: 100, to: 0, finish: function() {
		Spry.Utils.updateContent('response_form1', 'confirm.html', function() {
			Spry.Effect.DoFade('response_form1',{ duration: 500, from: 0, to: 100 });
		});
  }
 });
}

Open in new window

0
 

Author Closing Comment

by:Rassac
ID: 31503761
Thanks! excellent!! :)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Any business that wants to seriously grow needs to keep the needs and desires of an international audience of their websites in mind. Making a website friendly to international users isn’t prohibitively expensive and can provide an incredible return…
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

713 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