Workflow and ServiceDesk Community

 View Only
  • 1.  Move to another page with the onclick or doubleclick javascript custom events?

    Posted Jan 30, 2013 04:46 PM

    It seems like this is possible. I'm just not sure how to target a page or component in the javascript. Does anyone know how to do this? Or if there's a better way? Please help!



  • 2.  RE: Move to another page with the onclick or doubleclick javascript custom events?

    Posted Jan 30, 2013 04:54 PM

    Try doing a

    window.location = "Hai_IAmAPage.htm";

    in JavaScript.



  • 3.  RE: Move to another page with the onclick or doubleclick javascript custom events?

    Posted Jan 30, 2013 05:02 PM

    Where do I get the page name from? It doesn't seem to be working.



  • 4.  RE: Move to another page with the onclick or doubleclick javascript custom events?

    Posted Jan 30, 2013 05:10 PM

    I need the workflow to move to another form builder or integration onclick. How do I reference them?



  • 5.  RE: Move to another page with the onclick or doubleclick javascript custom events?

    Posted Jan 30, 2013 05:21 PM

    What do you mean by a new form builder/integration? Are you referring to another deployed project?



  • 6.  RE: Move to another page with the onclick or doubleclick javascript custom events?

    Posted Jan 31, 2013 09:38 AM

     

    Sorry for the confusion

    When I said Form builder, I meant another page within the same project.

    When I said integration, I meant something like a custom SQL component I created for that same project.



  • 7.  RE: Move to another page with the onclick or doubleclick javascript custom events?

    Posted Jan 31, 2013 09:43 AM

     

    If I can target something in the workflow via javascript, then I can make this work. Does anyone know how to do so?



  • 8.  RE: Move to another page with the onclick or doubleclick javascript custom events?
    Best Answer

    Posted Jan 31, 2013 09:50 AM

    Here's something you can try, unsure if it'll work.

    1. Add a button to the form with visibility set to false. Hook up the path of the button back to the form you want to navigate to

    2. Add a custom javascript event for "onclick" that finds that hidden control and forces a click. Assuming the Control ID of the hiddent button is "woohoo" (no double quotes), the JS would be:

    var button = document.getElementById('woohoo');

    button.click();

    There's probably better ways to do this in Workflow, but this is a JS route if there was one.



  • 9.  RE: Move to another page with the onclick or doubleclick javascript custom events?

    Posted Jan 31, 2013 11:32 AM

    IT WORKED! Thank you so much reecardo.

    You're the man.



  • 10.  RE: Move to another page with the onclick or doubleclick javascript custom events?

    Posted Jan 31, 2013 11:57 AM

    Though I haven't tried this or needed it yet, I think that's a pretty slick solution. Thanks.