none
SharePoint Designer Form Button Navigate to next page with delay RRS feed

  • Question

  • So I have put a form action button in my page designed via spd.

    in the button I am doing a commit and then navigate to page.

    but I want to navigate with a 10 second delay because the commit will trigger a workflow which would need a few seconds time to complete.

    Does anyone know how to do this?


    val it: unit=()

    Wednesday, September 12, 2012 7:00 PM

All replies

  • Hi,

    Thank you for your post.
    I'm trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

    Thanks & Regards,
    Emir


    Emir Liu

    TechNet Community Support

    Friday, September 14, 2012 2:02 AM
  • Original code of Form Action button looks like following:

    <input type="button" value="Form Action" name="btnFormAction" onclick="javascript: {ddwrt:GenFireServerEvent('__workflowStart={,,{6E923858-A281-4F3F-9C79-DBDFB34DD38F},}')};" />

    I added a JS pause function after triggering the workflow, here it is:

    <input type="button" value="Form Action" name="btnFormAction" onclick="javascript: {ddwrt:GenFireServerEvent('__workflowStart={,,{6E923858-A281-4F3F-9C79-DBDFB34DD38F},}')};pausecomp(waitMillis);" />

    The JS function:

    -----------------------------------------
    <script  type="text/javascript" >
    function pausecomp(waitMillis){
    var date = new Date().getTime();
    var curDate = null;
    do{curDate=new Date().getTime();}
    while(curDate - date < waitMillis);
    }
    </script>
    I referred to this site for JavaScript: http://www.sean.co.uk/a/webdesign/javascriptdelay.shtm

    Regards,

    Jing Wang | Microsoft Online Community Support



    Tuesday, November 13, 2012 2:44 PM