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 uthats the code for the button I wont to pressCode:<INPUT ID=onetidOk class="ms-ButtonHeightWidth" Type="button" Value=" OK " onclick="ConfirmAndSubmit()">Thats the code the button callsCode: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(); } }
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.




.
Reply With Quote