B BMP Banned Dec 15, 2011 #1 Good morning, i have a question. I wont to login to a Webside and i can´t do it with B4A. The Code inside the Weside are: B4X: <input name="usr" type="text" id="usr" value="Tippername" size="22" onfocus="if(this.value=='Tippername')this.value=''; return true;" onblur="if(this.value=='')this.value='Tippername'; return true;" /> <input name="pwd" type="password" id="pwd" value="*****" size="22" onfocus="if(this.value=='*****')this.value=''; return true;" onblur="if(this.value=='')this.value='*****'; return true;" /> <input name="setcookie" type="checkbox" id="setcookie" value="true" checked="checked" class="check" /> <input name="login_submit" type="image" src="style/gfx/login.png" id="login_submit" value="Einloggen" /> Can anybody help me to make this in B4A ? Thanks and greetz from Germany.
Good morning, i have a question. I wont to login to a Webside and i can´t do it with B4A. The Code inside the Weside are: B4X: <input name="usr" type="text" id="usr" value="Tippername" size="22" onfocus="if(this.value=='Tippername')this.value=''; return true;" onblur="if(this.value=='')this.value='Tippername'; return true;" /> <input name="pwd" type="password" id="pwd" value="*****" size="22" onfocus="if(this.value=='*****')this.value=''; return true;" onblur="if(this.value=='')this.value='*****'; return true;" /> <input name="setcookie" type="checkbox" id="setcookie" value="true" checked="checked" class="check" /> <input name="login_submit" type="image" src="style/gfx/login.png" id="login_submit" value="Einloggen" /> Can anybody help me to make this in B4A ? Thanks and greetz from Germany.
Erel B4X founder Staff member Licensed User Longtime User Dec 15, 2011 #2 Use Firebug or another Http traffic monitor to understand the Http request that is sent when you submit this form. Upvote 0
Use Firebug or another Http traffic monitor to understand the Http request that is sent when you submit this form.
B BMP Banned Dec 15, 2011 #3 Erel said: Use Firebug or another Http traffic monitor to understand the Http request that is sent when you submit this form. Click to expand... OK, thank you, now i have found that i must make a HTML POST Request whis the URL: http://tipp.XXXX.de/index.php?usr=XXXX&pwd=XXXXX&setcookie=true&login_submit.x=0&login_submit.y=0 Can B4A send HTML POST Requests ??? Upvote 0
Erel said: Use Firebug or another Http traffic monitor to understand the Http request that is sent when you submit this form. Click to expand... OK, thank you, now i have found that i must make a HTML POST Request whis the URL: http://tipp.XXXX.de/index.php?usr=XXXX&pwd=XXXXX&setcookie=true&login_submit.x=0&login_submit.y=0 Can B4A send HTML POST Requests ???
Erel B4X founder Staff member Licensed User Longtime User Dec 15, 2011 #4 Yes. See these links: Basic4android Search: post request Upvote 0
B BMP Banned Dec 16, 2011 #5 Earl i hope you can help me one more time. I have try it the whole night.... :BangHead: But i didnt reach that i am login into the Side: B4X: Sub GoBtn_Click postdate = "?usr=XXX&pwd=XXX&setcookie=true&login_submit.x=0&login_submit.y=0" PostUrl = "http://tipp.marcusXXX.de/index.php" HttpUtils.CallbackActivity = "Main" HttpUtils.CallbackJobDoneSub = "JobDone" HttpUtils.CallbackUrlDoneSub = "UrlDone" Msgbox("Sending URL","") HttpUtils.PostString ("Job1",PostUrl,postData) End Sub Can you find a error in that code ? Upvote 0
Earl i hope you can help me one more time. I have try it the whole night.... :BangHead: But i didnt reach that i am login into the Side: B4X: Sub GoBtn_Click postdate = "?usr=XXX&pwd=XXX&setcookie=true&login_submit.x=0&login_submit.y=0" PostUrl = "http://tipp.marcusXXX.de/index.php" HttpUtils.CallbackActivity = "Main" HttpUtils.CallbackJobDoneSub = "JobDone" HttpUtils.CallbackUrlDoneSub = "UrlDone" Msgbox("Sending URL","") HttpUtils.PostString ("Job1",PostUrl,postData) End Sub Can you find a error in that code ?
NJDude Expert Licensed User Longtime User Dec 16, 2011 #6 I see 2 different names: You are defining POSTDATE: B4X: postdate = "?usr=XXX&pwd=XXX&setcookie=true&login_submit.x=0&login_submit.y=0" and posting POSTDATA: B4X: HttpUtils.PostString ("Job1",PostUrl,postData) Upvote 0
I see 2 different names: You are defining POSTDATE: B4X: postdate = "?usr=XXX&pwd=XXX&setcookie=true&login_submit.x=0&login_submit.y=0" and posting POSTDATA: B4X: HttpUtils.PostString ("Job1",PostUrl,postData)