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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:53:44+00:00 2026-05-25T15:53:44+00:00

When using jQuery to insert HTML into a div in IE8, IE8 strips the

  • 0

When using jQuery to insert HTML into a div in IE8, IE8 strips the ID tags and certain class names in the HTML.

Here is a sample. I am inserting this code using jQuery (1.6.2)

var oblSomeoneElseHTML = 
'<div id="oblSomeoneElse">' +
'  <h2>Enter the name and email of a person you\'d like<br/>to purchase a registration for:</h2>'+
'<form class="voucher_form" id="voucher_form">'+
'  <div class="inputrow"><label class="l1">Student Alliance Member #:</label> <input type="text" id="customer_id" name="customer_id" class="oblSomeoneElseCustID"/></div><br>'+
'  <div class="inputrow"><label class="l1">Student First Name:<em>*</em></label> <input type="text" id="firstname" name="firstname" class="validate[required] oblSomeoneElseFirstName"/></div><br>'+
'  <div class="inputrow"><label class="l1">Student Last Name:<em>*</em></label> <input type="text" id="lastname" name="lastname" class="validate[required] oblSomeoneElseLastName"/></div><br>'+
'  <div class="inputrow"><label class="l1">Student Date of Birth:<em>*</em></label> <input type="text" id="DOB" name="DOB" class="validate[required,custom[MMDDYYYY]] oblSomeoneElseDOB"/></div><br>'+
'  <div class="inputrow"><label class="l1">Student Email:<em>*</em></label> <input type="text" id="SomeoneElseEmail" name="SomeoneElseEmail" class="validate[required,custom[email] oblSomeoneElseEmail"/></div><br>'+
'  <a href="#" class="btn btncenter oblsomeoneelsenext">Next</a>'+
'  <div class="spinner"><img src="/images/grey_spinner.gif"></div>'+
'</form>'+
'<img src="/images/blank.gif" width="20" height="20" alt="" border="0" style="position: relative; left: 5px; cursor: pointer;" onclick="clearPrompts();">'+
'</div>';

  $('#sm_content .oblcontent').html(oblSomeoneElseHTML);

Now, when I am debugging the validation of the DOB input and view the value of oblSomeoneElseHTML in the Watch window, it shows the ID and the correct class attributes.
I am using validationEngine plugin to validate this form and it REQUIRES the ID tag to work.

<input type="text" id="DOB" name="DOB" class="validate[required,custom[MMDDYYYY]] oblSomeoneElseDOB"/></div>

But, when I debug into the validationEngine code, this, in the _getPrompt() function:

 var className = field.attr("id").replace(":","_") + "formError";

returns this error:

'attr(...)' is null or not an object

When I evaluate the field object, I see no id value and I see only class oblSomeoneElseDOB.

I am at a loss as to what is happening here and why this is only happening in IE8. IE7 and IE9 work perfectly, FF and Chrome and Opera work perfectly, too.

Anyone have any ideas on how to fix 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-25T15:53:45+00:00Added an answer on May 25, 2026 at 3:53 pm

    Reverted back to using the form already built in the html, not generated through javascript, and everything works now. We did things a little differently but it is working like a charm.

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

Sidebar

Related Questions

I am trying to insert a div inside another div using add() of jquery
I am trying to insert a chunk of HTML into a div. I want
I used the following jquery to insert a metatag into a html document. <script
I'm loading and inserting html-code using Jquery Load() method. But when I'm trying to
I'm using the .load() function in jquery to insert the results of a php
I am new to jquery ! I am using the code below to insert
I'd like to load/insert an external html page into my web page. Example :
With jquery it's very easy to insert some element inside another element using the
Insert ellipsis (...) into HTML tag if content too wide mentions how to insert
I am using Json to retrieve elements from mysql and insert them into form

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.