how to put javascript in the gmails address bar using some code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gamazone
    New Member
    • Sep 2010
    • 7

    how to put javascript in the gmails address bar using some code

    hello every one

    i want to put a javascript code in the address bar of the gmail home page ,and press Go button , is it possible using some coding??
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    what do you want to do exactly? basically you could do something like this:
    Code:
    location.href="javascript:alert('foo');"
    from javascript code - but it depends on the point from where you want to inject that - due to the limits of the same origin policy which should avoid XSS attacks

    Comment

    • gamazone
      New Member
      • Sep 2010
      • 7

      #3
      hi,

      thx for reply, and i was not aware of the same origin policy...now i know..

      actually i want to automatically fill and automatically click the gmail login form

      for that i can MANUALLY put a javascript(whic h sets the username and password of the gmail) in the address bar of the gmail and on hitting enter, it logs in ......

      so instead of putting script manually i want to put it using some code so that from my application this script get set in the address bar of the gmail..this is my whole idea.....

      what you think can it be done?????
      or if you have any other idea to autofill and autologin gmail please suggest.

      Comment

      Working...