Question : Is it possible to combine SPRY widgets?

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.

Answer : Is it possible to combine SPRY widgets?

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
1:
2:
3:
4:
5:
6:
7:
8:
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 Select All
Random Solutions  
 
programming4us programming4us