CerealBH Posted February 4, 2008 Share Posted February 4, 2008 I'm using CURL and am trying to get it to submit a form, i can get the form filled out no problem, but the the submit button is javascript that points 2 doPreview() anyone know how to do this, or a reference so i can figure it out? Quote Link to comment https://forums.phpfreaks.com/topic/89450-curl-and-javscript/ Share on other sites More sharing options...
teng84 Posted February 5, 2008 Share Posted February 5, 2008 where is the question there? Quote Link to comment https://forums.phpfreaks.com/topic/89450-curl-and-javscript/#findComment-458110 Share on other sites More sharing options...
CerealBH Posted February 5, 2008 Author Share Posted February 5, 2008 heh my bad, i need to know how to submit a javascript command..i dont' have a link that i can use as the action of the submit i have to use a javascript command understand what im saying? Quote Link to comment https://forums.phpfreaks.com/topic/89450-curl-and-javscript/#findComment-458115 Share on other sites More sharing options...
CerealBH Posted February 5, 2008 Author Share Posted February 5, 2008 bump Quote Link to comment https://forums.phpfreaks.com/topic/89450-curl-and-javscript/#findComment-458165 Share on other sites More sharing options...
CerealBH Posted February 5, 2008 Author Share Posted February 5, 2008 bump Quote Link to comment https://forums.phpfreaks.com/topic/89450-curl-and-javscript/#findComment-458230 Share on other sites More sharing options...
CerealBH Posted February 5, 2008 Author Share Posted February 5, 2008 bump before bed, hopefully will wake up 2 a answer! Quote Link to comment https://forums.phpfreaks.com/topic/89450-curl-and-javscript/#findComment-458343 Share on other sites More sharing options...
CerealBH Posted February 5, 2008 Author Share Posted February 5, 2008 bump Quote Link to comment https://forums.phpfreaks.com/topic/89450-curl-and-javscript/#findComment-459130 Share on other sites More sharing options...
teng84 Posted February 5, 2008 Share Posted February 5, 2008 you mean instead of using the regular button you want to use JS you mean this? <html> <head> <script type="text/javascript"> function formSubmit() { document.getElementById("myForm").submit(); } </script> </head> <body> <p>Enter some text in the text fields below, and then press the "Submit" button to submit the form.</p> <form id="myForm" action="js_form_action.asp" method="get"> Firstname: <input type="text" name="firstname" size="20"><br /> Lastname: <input type="text" name="lastname" size="20"><br /> <br /> <input type="button" onclick="formSubmit()" value="Submit"> </form> </body> Quote Link to comment https://forums.phpfreaks.com/topic/89450-curl-and-javscript/#findComment-459171 Share on other sites More sharing options...
CerealBH Posted February 6, 2008 Author Share Posted February 6, 2008 yes the page im using curl to navigate 2 uses a submit button like that, how do i get curl to evaluate "formSubmit()"? do i jsut do CURLOPT_POST like normal? Quote Link to comment https://forums.phpfreaks.com/topic/89450-curl-and-javscript/#findComment-459274 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.