onclick event - InfoPath Dev
in

InfoPath Dev

onclick event

Last post 10-07-2009 06:23 AM by RoccoNH. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-06-2007 08:30 AM

    • jikner
    • Not Ranked
    • Joined on 02-06-2007
    • Posts 1

    onclick event

    I have a need to create a button that will submit a form to a form library and at the same time open an URL in a new window.

    I have tried some suggestions on using the onclick event for the button, but can't seem to get what I need.

    Any suggestions on how to make this work would be great.

    Thanks
  • 02-06-2007 10:32 AM In reply to

    Hi jikner and welcome to the forums!

    The best way to open a URL in a browser windows is with a hyperlink control in the view. You could bind this control to a node and dynamically change the URL that it opens. As for doing both of these actions with one button click I'm not sure how possible it will be.

    There are two ways to open a URL from code: 1) create a Process object linked to "iexplore.exe" and pass the URL as a parameter (this requires full trust) 2) If the URL you are opening is an InfoPath form, you can use thisXDocument.CreateFromSolutionURI( URL ) to open it - but this hasn't worked well for me in the past.

    I'm not sure if it's possible but if you can put rules on the hyperlink control this is where you should add the form submit and then you'll be golden.
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 02-13-2007 01:29 AM In reply to

    To both launch the hyperlink and submit with just one button click you will have to use code.

    Note that your code can just call the same data connection you have setup so it's not too hard if you're a dev already.
    Shiraz Cupala / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 10-07-2009 06:23 AM In reply to

    Hi Matt.

    This is my first ever blog/post ever so please bare with me here. I face a similar issue as described above.

    I built a SPoint "dashboard" to collect change requests from individuals. These "requests" are sent to SharePoint and I use a Designer workflow to manage the notifications when something moves from one status to another.  It's pretty slick.

    I currently have a "submit" button that sends the form via a data connection to two sharepoint sites and gives a happy "thank you message" but now I want to launch an Access Database and close the IP03 form at the same time.

    The link to the database is on a drive, ( \\Sfaxx28\16compd\SchedulingDB\Scheduling.mdb). Currently I have it as a page in another view. There does not appear to be an available "action" to open a hyperlink on the button except for code.  I was going to do the "OnClick" but I know about as much VBA code as a fly.

    Any assistance is greatly appreciated. Thank you in advance.

     

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.