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

  • Home
  • SEARCH
  • 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 5997501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:16:22+00:00 2026-05-23T00:16:22+00:00

I have the following HTML: <input id=outer type=file onchange=console.log(‘No.’);> <input id=inner type=file onchange=console.log(‘Yes!’); />

  • 0

I have the following HTML:

<input id="outer" type="file" onchange="console.log('No.');">
    <input id="inner" type="file" onchange="console.log('Yes!');" />
</input>

Styled like such:

#inner { cursor: pointer; position:absolute; opacity: 0; }
#outer { position: relative; overflow: hidden; direction: ltr; }

It looks like just a standard file input element, as the #inner input element is hidden and wrapped by the #outer one. My desired behavior is to see “Yes!” when I select a file, which I get with Webkit browsers (both inputs activate) but not Firefox. Do you have any ideas about how I can get this in Firefox as well?

  • 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-05-23T00:16:23+00:00Added an answer on May 23, 2026 at 12:16 am

    The reason for the difference in behaviour is most likely that the code is invalid.

    See HTML 4: 17.4 The INPUT element: “Start tag: required, End tag: forbidden“

    So, you can’t nest an input tag inside another. Different browsers handle invalid markup differently, so they can for example ignore that one is inside the other and place them beside each other, or ignore the inner tag completely.

    If you are curious, you can use FireBug to examine the DOM to find out what elements are created from the markup, but it’s really moot as invalid markup won’t work reliably anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following html: <div class=rows> <div class=row><input type=text onchange=javascript:getIndex(this); value= /></div> <div class=row><input
I have the following html code: <div class=Radios> <span class=radio> <input type=radio value=1> yes
I have the following HTML Tags: <input id="bigPicture" name="bigPicture" type="file" value=""> <img src="test.png" id="test1">
I have the following html code to upload an image: <input type=file name=before size=40>
I have the following HTML: <label class=fileinput-button> <span>add file...</span> <input type=file name=file disabled> </label>
I have the following HTMl: <input id=brandID name=brandID type=hidden value= /> <select id=selectList class=textfield70pc
Suppose I have the following HTML: <form id=myform> <input type='checkbox' name='foo[]'/> Check 1<br/> <input
I have the following HTML generated by an ASP.NET repeater: <table> <tr> <td><input type=hidden
I have the following problem: I have an HTML textbox ( <input type=text> )
I have the following HTML <input type=hidden name=conf1 value=7th IEEE/IFIP International Conference on Embedded

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.