Solved

Is it possible to combine SPRY widgets?

Posted on 2008-10-07
3
427 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
This video teaches users how to migrate an existing Wordpress website to a new domain.
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…

821 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