Solved

Is it possible to combine SPRY widgets?

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This video teaches users how to migrate an existing Wordpress website to a new domain.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now