www.webdeveloper.com
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2011
    Posts
    1

    Question Auto submit credentials

    I have managed to figure out how to pass credentials but I am really struggling with how to have the submit button invoke automatically. My dream is for the below code which is tied to a URL to pass the credentials to the webpage and enter with just the user clicking the URL link.

    Is it possible?

    Here is my code:

    How can I get the submit to auto run?

    My code is as follows:

    <html>
    <head>
    <style>
    div {padding-bottom: 10px;}
    </style>
    </head>
    <body>
    <form action="URL Link Here" method="post">
    <input type="hidden" name="username" value="USER" />
    <input type="hidden" name="password" value="GUEST"/>
    <div><input type="submit" value="Guest Login" /></div>
    </form>
    </body>
    </html>

  2. #2
    Join Date
    Apr 2012
    Location
    Lahore
    Posts
    1

    Auto Submit FORM

    I know its very late to reply this question, but adding the answer so might help any one else.

    Let say we want to submit the form as soon as the page get loaded.
    I have marked my changes as bold in your code.

    <html>
    <head>
    <style>
    div {padding-bottom: 10px;}
    </style>
    </head>
    <body>
    <form name="frm1" action="URL Link Here" method="post">
    <input type="hidden" name="username" value="USER" />
    <input type="hidden" name="password" value="GUEST"/>
    <div><input type="submit" value="Guest Login" /></div>
    </form>
    </body>
    <script languge="javascript">
    document.frm1.submit();
    </script>
    </html>

    NOTE: Please remember the above code might immediately submit the form (and navigate away to the provided url) and you may not see this form at all

  3. #3
    Join Date
    Jan 2013
    Location
    Cirebon, West Java
    Posts
    1
    The information interesting and very useful.
    Thank you for your sharing.

  4. #4
    Join Date
    Jan 2013
    Posts
    10

    Best virtual server

    hi
    this auto submitter script is well code. or also available on internet in more easy way once search on that..

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



Recent Articles