controlling buttons

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • millie
    First Lieutenant

    • Apr 2009
    • 170

    controlling buttons

    Hello

    can someone direct me (I have searched the forum in vain) to where I can learn about command buttons? Right now, all I want to do is add a button that closes its window (I have a popup window for comments).

    I found a thread that says insert, advanced ... javascript, windowclose but when I tried it in preview, it did not work. Would it have worked if I publish the page?

    my site is www.subeagle.com and the popup is triggered by the 'Tell us what you think' link.

    Cheers all
    Millie
    www.subeagle.com
  • millie
    First Lieutenant

    • Apr 2009
    • 170

    #2
    Re: controlling buttons

    ok, i found the answer to this, no need to reply. thanks
    Millie
    www.subeagle.com

    Comment

    • millie
      First Lieutenant

      • Apr 2009
      • 170

      #3
      Re: controlling buttons

      Travilman suggested that I post my finding so others may benefit. Sorry for not thinking of this, I was trying to publish my 1st site. Anyway, what I was trying to do was provide a close button on an open window. In my www.subeagle.com, there is a link to leave comments "tell us what you think". I open a pop-up window with a name, email and comment fields created using the form wizard. With this, you need to create both a success and error page (remember that this is my first site?). When the submit button is hit and there is no error, the success page is displayed. But since my success page is in a pop-up, I wanted to have a command button to close the page, not needed as everyone knows how to close a window, but I do not like unfinished things. So, I need a button on the success page.

      So I; Insert, Form, Push button

      I then modified the properties of the button. To get the button to close the window, I went to the events tab, chose the event 'onClick', Action 'Java Function', and Javascript 'window.closed()'

      Did the trick. Sorry if this is way to much words just to explain how to get the button to close a window.
      Millie
      www.subeagle.com

      Comment

      • sharton
        Private First Class

        • Jun 2009
        • 5

        #4
        Re: controlling buttons

        Hello,

        If you don't mind I would like to use your idea for my web site.
        I have to say that I'm a bit lost with your explanations.
        Would you mind telling me step-by-step how to proceed.

        Cheers,

        Steve

        Comment

        • millie
          First Lieutenant

          • Apr 2009
          • 170

          #5
          Re: controlling buttons

          Hi,

          Sorry about that, I was trying to figure out more stuff. Anyway, teh step by step is this.

          From the menu bar, select Insert
          then scroll down to Form
          then select Push button

          This will add a (command) push button to the page, select that button.
          Right mouse click, choose Properties. In the events tab, clcik the Add Button. In the Add Event window, chose 'onClick' for the event, 'Java Function' for the Action, and a new field will appear labelled Javascript, choose 'window.closed()' for it. Click OK, OK and you're done.

          Let me know if this is still unclear. Happy to help.
          Millie
          www.subeagle.com

          Comment

          Working...
          X