Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jan 2005
    Posts
    221
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question filling and submitting forms in a different frame

    ok, this may seem foolish, but here goes... there's a website I often visit that requires the user to enter a username and password to enter, unfortunately, the site does not use cookies to store this info for next time. I want to write a simple set of 2 htmls (one frameset, one 0-size frame) that I can keep locally such that frameset html has 2 frames, one size zero, one the site i wish to enter. I want the zero size frame to put my data into their form onload and hit the submit... my question is, can js access the form fields and submit function of another frame, when that frame is not local? if so, how?

  • #2
    fci
    fci is offline
    Senior Coder
    Join Date
    Aug 2004
    Location
    Twin Cities
    Posts
    1,345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    make a copy of the page and bookmark it.
    you would essentially copy/paste the <form> and fill in the desired default values.. or.. there are apps that you can get to auto populate forms. if you use Firefox there is an extension called AutoForm.

  • #3
    Regular Coder
    Join Date
    Jan 2005
    Posts
    221
    Thanks
    2
    Thanked 0 Times in 0 Posts
    i've already looked into such things, but the method i specified would be best for this situation... the login is asked for on every page of the site, and i don't want to do anything to fill it out.

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,959
    Thanks
    0
    Thanked 236 Times in 233 Posts
    Save this as a bookmarklet and run it everytime you are asked for username and password in your favorite site.
    Code:
    javascript:f=document.forms[0];f.username.value='foo';f.password.value='blah';f.submit();
    Of course, you need to change the field names and values accordingly.


  •  

    Posting Permissions

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