+ Reply to Thread
Results 1 to 5 of 5

Thread: controlling buttons
      
   

  1. #1
    millie is offline First Lieutenant
    Join Date
    Apr 2009
    Posts
    170

    Question 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

  2. #2
    millie is offline First Lieutenant
    Join Date
    Apr 2009
    Posts
    170

    Default Re: controlling buttons

    ok, i found the answer to this, no need to reply. thanks

  3. #3
    millie is offline First Lieutenant
    Join Date
    Apr 2009
    Posts
    170

    Default 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.

  4. #4
    sharton is offline Private First Class
    Join Date
    Jun 2009
    Location
    France
    Posts
    5

    Thumbs up 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

  5. #5
    millie is offline First Lieutenant
    Join Date
    Apr 2009
    Posts
    170

    Default 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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49