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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:01:10+00:00 2026-05-13T13:01:10+00:00

This seems to be a common issue, and the solutions which I have seen

  • 0

This seems to be a common issue, and the solutions which I have seen do not seem to be working for me.

We’ve got a dynamically generated and inserted iframe, with a form which submits to it. Works fine in FF and IE8, but in 7 we are getting the iframe name issue (IE does not want to set iframe name using element.name or element.setAttribute(“name”,) ).

So I’ve converted our code over to this:

function insertTrafRepiFrame(){
    var contDiv = document.getElementById('trafficReportDiv');
    if(contDiv != null){
        var iFrame;
        try{
            iFrame = document.createElement('IFRAME');
        }catch(ex){
            iFrame = document.createElement('<iframe name="trafficreport">');                                        
        }
        iFrame.name = "trafficreport";
        iFrame.id = "trafficreport";
        iFrame.style.border = 0;
        iFrame.src = "http://www.frixo.com/widget/widget-report-area.aspx?road=all%38map=small%38latitude=51.1421%38longitude=-0.07545%38radius=50%38roadsearch=no%38roadlink=yes%38reporttype=full";
        while(contDiv.hasChildNodes()){
            contDiv.removeChild(contDiv.firstChild);
        }
        contDiv.appendChild(iFrame);
    }
}

With this form:

<form name="traffic_report" id="traffic_report" target="trafficreport" action="http://www.frixo.com/widget/widget-report.aspx" onsubmit="javascript:return CheckResponse(this);" method="get">
    <div id="trafficRepFormInps">
        <input type="hidden" name="map" value="small" />
        <input type="hidden" name="roadsearch" value="no" />
        <input type="hidden" name="roadlink" value="yes" />
        <input type="hidden" name="reporttype" value="full" /><br />
        <label for="road">Type a road below, i.e. M23:</label><br />                           
        <input name="road" value="M23" id="road" class="citysearchbox" type="text" /> 
    </div>
</form>

What I have noticed is that in developer tools, IE in 7 mode shows the iframe an attribute of submitName, where as 8 mode shows an attribute of propdescName. Could this discrepancy be causing this form misfiring? Or have I missed out on something else?

Thanks,
Psy

(PS. No moans about iFrame over iframe variable name please :p )

  • 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-13T13:01:11+00:00Added an answer on May 13, 2026 at 1:01 pm

    I think you do it right with the document.createElement('<iframe name="trafficreport">');

    But I’m not sure it is called as the document.createElement('IFRAME') will be ok, even in IE.

    We are using a dynamic iframe to sandbox cross domain JSONP calls, and it works fine in IE.
    The code I use is:

    var ifr = (/MSIE (6|7|8)/).test(navigator.userAgent) ? 
        document.createElement('<iframe name="'+id+'">'):
        document.createElement('iframe');
        ifr.name = id;
    

    You can check a working example here click on the Demo link. If the demo works it means something is wrong in your code, if it doesn’t work, something is wrong with your IE configuration.

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

Sidebar

Related Questions

This seems to make perfect sense, but it is not working. I seem to
This seems like it would be a common issue to be but I don't
This seems to be a common problem, but I cant seem to fin a
I've looked around for a solution but it seems this is not a common
I've seen several threads with the same issue, but none of the solutions seems
This seems a to be a common issue, but i just can't find a
This may be something common and trivial, but I seem to be having trouble
This seems a 'stupid' question, but let me explain. I'm working for a company
This seems like a repeated question but i'm not able to get my answer.
This seems like such a simple issue but I cannot find an elegant solution.

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.