How to using history.back() javascript method to the button in Infopath 2007 - InfoPath Dev
in

InfoPath Dev

How to using history.back() javascript method to the button in Infopath 2007

Last post 10-08-2010 04:13 PM by Patrick Halstead. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 10-03-2010 08:58 PM

    • datvt
    • Not Ranked
    • Joined on 10-04-2010
    • Posts 12

    How to using history.back() javascript method to the button in Infopath 2007

     Dear all,

     

    I have a infopath form A (2007 version) with a button called Back.  Form A open when user click on a link from Search screen (Webpart) with a result data table. The requirement is that whenever click Back button from A form, it is moved back to Search screen that kept same status as before go to A form (similar when user click Back button in IE browser).

    How we can do that requirements. Can we use History.Back() javascript?

    Please help to check if there is any solution.

    Many thanks,

     

     

  • 10-05-2010 11:21 PM In reply to

    Re: How to using history.back() javascript method to the button in Infopath 2007

    Hi DaTVT and welcome,

    Have you considered just using a link behind a button to accomplish the same thing? You'll have to hardcode it to your Search page, but that would be easier than hijacking javascipt on back. You could make the button really big on your form and put a screentip on it so that when users hover over they see "click here to return to Search".

    That would be much easier than going down the javascript rabbit hole....

    Happy foraging,

    Patrick Halstead
    Project Manager at Qdabra
  • 10-06-2010 09:41 PM In reply to

    • datvt
    • Not Ranked
    • Joined on 10-04-2010
    • Posts 12

    Re: How to using history.back() javascript method to the button in Infopath 2007

     Dear Patrick,

    Many thanks for your suggestion. But I still can not understand your solution. Could you explain more detail or give me a sample code, sir?

     

     

  • 10-06-2010 10:08 PM In reply to

    Re: How to using history.back() javascript method to the button in Infopath 2007

    Dearest DATVT,

    My suggestion for you does not involve code at all. You just need to add an html link to your form and make it look like a button. For example, use the characters "<<" and make them really large and bold. Then, associate the URL for the webpage that you want to navigate back to. When they click the "<<" label it navigates back to the previous page. You can also hook this up to work on a button press, but it's slightly more complicated.

    I'm really sorry, but we don't provide sample code anymore to people for specific problems. We just have too many requests and if we responded to all of them we would have no time to actually do paid work. Instead, we give general best practice and guidance to people for free. If there is a coding problem that is general, we may help debug it and offer suggestons, but we don't write code for people. Also, code is a bad practice for InfoPath.

    Best of luck in life,

    Patrick Halstead
    Project Manager at Qdabra
  • 10-08-2010 05:32 AM In reply to

    • datvt
    • Not Ranked
    • Joined on 10-04-2010
    • Posts 12

    Re: How to using history.back() javascript method to the button in Infopath 2007

     Dear Patrick,

    If do like this, does it keep all the status of search screen (keep all condition search and search result data table)? It mean similar to Back button of IE browser.

    I just think it only back to search screen  with original status, sir.

    Very sorry for disturb, but please help.

  • 10-08-2010 04:13 PM In reply to

    Re: How to using history.back() javascript method to the button in Infopath 2007

    You can pass parameters to Infopath and then use those parameters to concatenate to the URL that you click back to. Some extra work to set this up, but not too bad.

    Best of luck,

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (6 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.