homepage Welcome to WebmasterWorld Guest from 54.211.73.232
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Auto Log-in & Redirect Challenge
HMTL, JavaScript, Form, Redirect
keyindividual



 
Msg#: 4426737 posted 1:04 am on Mar 9, 2012 (gmt 0)

Hi Everyone.

I am a new member to WebmasterWorld so this is officially my first post!

I am attempting to login to a website automatically using login credentials which I have done successfully as here:

<html>
<head>
<title>Auto-Login to www.mysite.com</title>
</head>
<body onLoad="document.frmlogin.submit();">
<form name="frmlogin" id="frmloginid" method="POST"
action="https://www.mysite.com/login.asp" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="username" value="MYUSERNAMEHERE">
<input type="hidden" name="password" value="MYPASSWORDHERE">
</form>
</body>
</html>


Now comes the tricky part I can't figure out - what I need to do is go from this successful login > Auto-Navigate to another page within my Account Area > Then Auto Submit another form. I should note... I am not trying to do anything dodgy here - I just want to automate an action I must take everyday so I dont have to worry about it.

I don't know where to start or even if the above is the correct first step - If anyone can offer any suggestions or solutions that would be fantastic!

Look forward to hearing thoughts.

KeyIndividual.

 

Marshall

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4426737 posted 2:42 am on Mar 9, 2012 (gmt 0)

Hi KeyIndividual and welcome to WebmasterWorld.

Is it safe to assume that you are running .asp on the site? And dare I ask, why the onload submit/

Marshall

keyindividual



 
Msg#: 4426737 posted 2:54 am on Mar 9, 2012 (gmt 0)

It's not my site, but rather a business I am a member of and have my user/pw to login to my account area. I am required everyday to login, and submit a form, confirming I have taken an action (which is posting an ad). What I want to do is automate this - so "AutoLogin>NavigateToFormPage>SubmitForm".

The POST ACTION for the login form is .ASP as that is what they use on their site.

Haha, Dare I answer? Simple, I'm no expert and that did the auto-login for me which is my first step. As I mentioned Im not 100% sure If I am going about this the right way - so open to suggestions. I was thinking maybe I need to look at cURL to accomplish this? But again, any suggestions/examples on how I do that would be great.

Cheers!
KeyIndividual

Marshall

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4426737 posted 3:25 pm on Mar 9, 2012 (gmt 0)

If the page you want to auto navigate to after login is constant, you could use a meta refresh, javascript, or .asp script to auto redirect you to the intended page.

Marshall

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved