Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8524459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:41:32+00:00 2026-06-11T07:41:32+00:00

The website I’m talking about: https://sephir.ch/vfi/user/lernendenportal/index.cfm I wanted to make a simple bookmarklet which

  • 0

The website I’m talking about: https://sephir.ch/vfi/user/lernendenportal/index.cfm

I wanted to make a simple bookmarklet which fills my email and password into those two textboxes. My JS code works on any other site, but not on this one.

HTML:

 <input type="text" name="email" size="40" maxlength="60" class="tdschwarz" autocomplete="off">

JS:

 javascript:function fill() {alert(document.getElementsByName("email")[0].value);} fill();

Error:

 Uncaught TypeError: Cannot read property 'value' of undefined 

Do you guys have any ideas why it doesn’t work? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T07:41:34+00:00Added an answer on June 11, 2026 at 7:41 am

    Because the email field is within a frame, so the document object is not the same of the field’s.

    In order to access to that field, first you must obtain the document object it belongs to. Inspecting the DOM, you have to access to the #mainFrame frame:

    var frame = document.getElementsByName("mainFrame")[0];
    

    Now you can get the element:

    var email = frame.contentDocument.getElementsByName("email")[0];
    

    This works in modern browsers. In IE8 and older, there’s this nice document.frames property that can make things easier:

    var email = document.frames.mainFrame.document.getElementsByName("email")[0];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My website needs a .htaccess file that will redirect a user to index.php when
My website project includes taking data from the user in the form of two
Website: http://www.animefushigi.com Make your browser window skinny, note that there is no horizontal scroll
My website needs to have a form that automatically submits, sending the user (with
My website can be view from 2 different kind of URI: www.mywebsite.com/magazine or www.mywebsite.com/index.php/magazine
Our website uses Perl to provide a simple mechanism for our HR people to
Website: http://www.crystal-grace.so/compendium/resume.html http://www.crystal-grace.so/compendium/index.html CSS: http://www.crystal-grace.so/compendium/css/master.css Hi, for some reason the nav and section elements
My website layout changes if the user increases or decreases the browser's (any browser)
Our website runs on ASP.NET v4 and users log in user Forms authentication. We
My website runs a local .exe file (generates some data), when a user clicks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.