Results 1 to 2 of 2

Thread: Clicking a form button

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    15

    Clicking a form button

    ok I have made some code that fills out a series of forms for me and it works good exept on one of the pages there are two buttons and they are not submit buttons they are normal buttons... for example a submit button sends the form data to the link indicated by action= where as this button calls a function inside the webpage which does a few small things then submits.

    so rather than WebBrowser1.Document.frmWebPermSettings.submit
    I wont to click that button and here is some code to help u
    Code:
    <INPUT ID=onetidOk   class="ms-ButtonHeightWidth"  Type="button" Value="    OK    " onclick="ConfirmAndSubmit()">
    thats the code for the button I wont to press
    Code:
    function ConfirmAndSubmit()
    {
        var L_WebpermConfirm_Text = "Changing to inherited permissions may prevent you or other users from being able to access this Web site.  Are you sure you want to continue?";
        if( varWasUnique == 0 ||
            !(document.getElementById("RadioPermInherited").checked) ||
            confirm(L_WebpermConfirm_Text) )
        {
            document.forms.frmWebPermSettings.submit();
        }
    }
    Thats the code the button calls

    there are two buttons in the form "frmWebPermSettings" There is the one I wont to press "onetidOk" and the one I dont want to press "onetidClose"

    please help if you need more code ask for it and I will post it .
    Last edited by Hack; Mar 22nd, 2006 at 07:32 AM. Reason: Added [code] [/code] tags for more clarity.

Posting Permissions

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



Click Here to Expand Forum to Full Width