Forum Moderators: buckworks & skibum

Message Too Old, No Replies

1-click access to AdWords

like 1-click to AdSense but ... does not work :-(

         

caspita

1:59 am on Aug 31, 2005 (gmt 0)

10+ Year Member



First at all this post may not go here but because the script to do this was born here and because it involve in some way AW and AS I decided to put it here.

Many here know about the one-click access to AdSense account which works great:


<form method="post" action="https://www.google.com/adsense/login.do" name="login">
<input type="hidden" name="destination" value="">
<input type="hidden" name="username" value="{USER_NAME}">
<input type="hidden" name="password" value="{PASSWORD}">
</form>

<body>
<script language="javascript">
document.login.submit();
</script>
</body>

Now, I'm trying to do the same with AdWords login:


<form action="https://adwords.google.com/select/LoginValidation" name="loginform" method="POST">
<input type="hidden" name="javascriptEnabled" value="true">
<input type="hidden" name="hl" value="en_US">
<input type="hidden" name="mkc" value="0">
<input type="hidden" name="resendemail" value="false">
<input type="hidden" name="login.userid" value="{USER_NAME}">
<input type="hidden" name="login.password" value="{PASSWORD}">
<input type="submit" name="login" value="Login">
</form>

<body>
<script language="javascript">
document.loginform.submit();
</script>
</body>

However, when the javascript is executed, it does not login into the AW account, it is like AW is redirecting back to the login page. I tested the page exactly the same but without automatically submiting the form with javascript, so I just have to click in the 'Login' button and it works fine, but when I enable the automatic submit using the javascript code it does not work.

Can any JavaScritp/Forms guru here let me know what I'm missing?

TIP: The original form from the AW login page does not have a 'name' attribute which is nedeed for the javascript to be able to call the submit method. So the name="loginform" attribute is mine, I did name the form to be able to use the javascript, anyway, when I test the form without the javascript even having the 'name' attribute for the form it works!. You can try just commentin and un-commenting back the document.loginform.submit(); line, that's all!

I hope you can help me ;-)... it has become personal now :-).

Thanks!
CS.

caspita

6:15 pm on Aug 31, 2005 (gmt 0)

10+ Year Member



sooo... nobody?

ann

6:30 pm on Aug 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can't help you but maybe you can help me :-)

Where do you put the adsense 1 click code?

Sorry so dense but not a professional programer.

Ann

herb

6:33 pm on Aug 31, 2005 (gmt 0)

10+ Year Member



Build an HTML page with the script, save it to your HD and add it to your links

ann

6:35 pm on Aug 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thank you!

Ann