Disable buttons with vbscript - InfoPath Dev
in

InfoPath Dev

Disable buttons with vbscript

Last post 08-14-2006 01:59 PM by vt_asparagus. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-09-2006 06:59 PM

    • Carlos
    • Top 500 Contributor
    • Joined on 01-24-2006
    • Australia
    • Posts 31

    Disable buttons with vbscript

    Hi all,

    Now before anyone says this, I know that buttons can be dissabled by InfoPath GUI, but the problem is:

    I have 15 buttons (menus actually) which opens views when clicked on them (15 menu buttons for 15 views). Now I need to dissable certain buttons depending on a value in the form, so if value = 1 buttons 2, 5, 7 and 11 are dissabled (for example). Now I can do this, but when you look at how much time/effort is required to do every button for every view (15x15) FORGET IT! Why work harder when you can work smarter and script this task. So, my question is, how in VBSCRIPT can one disable a button? For example:

    If value.text = 1 Then
    Button1 is disabled and Button2 is disabled and Button5 is .... etc etc

    Any help here on the code would be gratefully received ;)
  • 08-10-2006 01:04 AM In reply to

    Re: Disable buttons with vbscript

    Hi,

    Try out this link.
    http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=2726
    Hope this will help you.

    Thank you.
  • 08-13-2006 04:24 PM In reply to

    • Carlos
    • Top 500 Contributor
    • Joined on 01-24-2006
    • Australia
    • Posts 31

    Re: Disable buttons with vbscript

    Thanks for your reply, and I have seen that post and tried it with success. However, I still would like to be able to do the entire lot in VBScript, somthing like the VB code button1.enabled = false etc etc.

    Cheers,
  • 08-14-2006 01:59 PM In reply to

    Re: Disable buttons with vbscript

    I had the initial impression when I started to work with the tool. The reason why is that all of the events in InfoPath that are raised seem to be raised from the xml document and not directly from the controls that are on the form. This makes a lot of sense but at times I have to reverse they way I think of things <g>
    Jason
    http://www.k2distillery.com/
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.