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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:47:23+00:00 2026-05-18T05:47:23+00:00

I am wondering my IE6 and IE7 is messing up dynamic HTML generated by

  • 0

I am wondering my IE6 and IE7 is messing up dynamic HTML generated by JavaScript (use with FancyBox and jQuery).

For example:

var html = '<a href="#fancyBoxContent" class="fancybox"></a>';
document.getElementById('container').innerHTML = html;

Instead of filling the container with ‘<a href="#fancyBoxContent" class="fancybox"></a>‘, it becomes ‘<a href="http://website.com/#fancyBoxContent" class="fancybox"></a>’.

Any type of HTML/CSS which is valid, but IE6 and IE7 considers ‘odd’ gets all messed up. I could create HTML with DOM elements, but while this example is simple, it would mean my more complex code will result in javascript which is many times more complex and long. Also, cross compat becomes a issue as well as not always being able to control the exact synax of the HTML code being generated. Hence why I create dynamic HTML using javascript in this manner, DOM elements and builders break a lot of the valid HTML/CSS I try to generate.

Any ways around this?

  • 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-18T05:47:24+00:00Added an answer on May 18, 2026 at 5:47 am

    There’s no way that I am aware of around this particular issue. It shouldn’t cause any problems, though. Behavioral wise, http://website.com/foo#fancyBoxContent and #fancyBoxContent is the same, given the URL of the current page is http://website.com/foo.

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

Sidebar

Related Questions

Wondering how to open many new windows with Javascript. I have found plenty of
I am wondering how do I first detect if Javascript is enabled/disabled. Disabling javascript
i am moving from jquery to prototype because of compatibility issue with IE6. basically,
The following jQuery works fine in Firefox for me, but failed in IE6: $(<map></map>).attr(name,somevar).appendTo(#someElement);
I was wondering if there was a way of using HTML for the content
I'm wondering which of the following jQuery queries is going to be faster. I'm
Wondering if there's any not-too-hard way to edit non-form text in html 4. I
I'm wondering if folks can tell me how trouble free CSS3PIE is for IE6
I'm pretty new to javascript / ajaax / jquery, but I was able to
I'm wondering if there is anything like Django's HTML templating system, for for CSS..

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.