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 9175367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:54:04+00:00 2026-06-17T16:54:04+00:00

function HandleFileButtonClick(val) { var ss=val.name; var n=ss.split(choiceimgs); alert(n[1]); document.forms[addpoll][choiceimg + n[1]].click(); } In the

  • 0
  function HandleFileButtonClick(val)
  {
      var ss=val.name;
      var n=ss.split("choiceimgs");
      alert(n[1]);
      document.forms["addpoll"]["choiceimg" + n[1]].click();
  }

In the above coding it holds the variable value upto n[1]. The alert shows a number. If the line works then it will click a file input and the browser window will open.

This works fine in chrome, but in IE8 is not working. How to write the above line in IE8. And also document.forms['addpoll']['choiceimg'+i].style.display='';

this line also not working in my page. I tried the whole day to fix this. But I can’t find any solution. Anyone can help me to solve this issue. 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-17T16:54:06+00:00Added an answer on June 17, 2026 at 4:54 pm

    Because no examples are available I assume that the code line

    document.forms["addpoll"]["choiceimg" + n[1]].click();
    

    points to a form field. If so then you have to change it into follows:

    document.forms["addpoll"].elements["choiceimg" + n[1]].click();
    

    I am not sure to 100 perscent that the concatenation of .click() is correct, though the change to

    document.forms['addpoll'].elements['choiceimg'+i].style.display='';
    

    By the way I recommend the explicit use of value none and display, so you can exclude a source of error.

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

Sidebar

Related Questions

function Apple(){ this.name=apple; } function Orange(){ this.name=orange; this.apple = new Apple(); this.apple.onCalled=function(){ alert(this.name); }
function getWindowsUserName() { var WinNetwork = new ActiveXObject(WScript.Network); var urlToSite = createCustomURL(WinNetwork.UserName); document.getElementById(psyncLink).src =
function getUser() { FB.api('/me', function(response) { console.log('Response is '+response); alert('Your name is ' +
function getUsername() { var userName = document.form.screen_name.value; document.getElementById(display).innerHTML = userName; var apiName = https://api.twitter.com/1/users/lookup.json?screen_name=
(function() { var theArg; google = function(arg) { theArg = arg; alert(theArg); } yahoo
function ajaxCheck(){ var inpUs = $(#user).val(); $.post( ./inpCheck.php, { user : inpUs }, function(data)
function addrewarddb() { var rval=98; $.post(db/mkreward.php,{ proid:getURLParameter(id) },function(data){ rval=99; alert(rval); }); alert(rval); return rval;
function saveData() { var rows = $('#deviceTable tr').length; var toSave = ; alert(rows); for(var
function CheckavailOnload() { var elems = document.getElementsByClassName('box-collateral box-related'); for(var i = 0; i <
function CheckavailOnload() { var elems = document.getElementsByClassName('box-collateral box-related'); var av = document.getElementsByClassName('availability in-stock'); var

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.