Tuesday, April 10, 2012

Redirect Infopath Webpart to Custom URl after Submit the Form

This is the solution to recirect the Infopath webpart to custom URl, after submit the form.

Step1: Create a page and add Infopath Webpart.
Step2: Refer the Infopath Form in Infopath Webpart.
Step3: Add a content Editor Webpart to the Infopath webpart page and add below code.

script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javascript"
/script

script src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js" type="text/javascript"

/script

script src="http://ajax.googleapis.com/ajax/libs/scriptaculous/1.8.3/scriptaculous.js" type="text/javascript"

/script

script type="text/javascript"
( function($)
{
// we can now rely on $ within the safety of our “bodyguard” function
$(document).ready(
function()
{
if($('#DialogFinalMessage').children().length>0)
{
window.location.href = "custom url";
}

}
);
} ) ( jQuery );

/script

2 comments:

Cindy Dy said...

You are an awesome blogger. This is one of the best blog I had visited so far. Hope to read more post from you in the future. Keep it up. God bless.

Bubble
www.gofastek.com

sarah lee said...

I really enjoyed reading your article. I found this as an informative and interesting post, so i think it is very useful and knowledgeable. I would like to thank you for the effort you have made in writing this article.


edupdf.org