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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:03:42+00:00 2026-05-26T14:03:42+00:00

I have a function that gets some notifications, loops through them and the adds

  • 0

I have a function that gets some notifications, loops through them and the adds them to a div using Jquery’s prepend function. The important part looks like this

var myDiv = setNotificationDiv(notif.id, notif.title, notif.message, notif.sentDate, notif.readDate);
$('#leftContent').prepend(myDiv);

The setNotificationDiv uses Array.join to create a div that contains all the notification information and returns a string

function setNotificationDiv(id, title, message, sentDate, readDate){
    var temp = [];
    temp.push("<div class='notification'><input type='hidden' value='");
    temp.push(id);
    temp.push("' name='id'/><h2>");
    temp.push((title.length > 23 ? title.substring(0,23).concat('...') : title));
    temp.push("</h2><div class='inlineNotification'><p id='sent'>Sent: ");
    temp.push(formatDate(sentDate));
    temp.push("</p>");
    temp.push((readDate != null ? "<img id='read' src='content/images/readNotification.png'/>" : "<img id='read' src='content/images/unreadNotification.png'/>"));
    temp.push("</div><a href='#' class='deleteNotification'><img src='content/images/deleteNotification.png'</a></div>");
    var str = temp.join('');
    return str;
}

The problem is that in IE, all that is being added is this for each notification:

<img src="http://localhost:8080/content/images/deleteNotification.png" a="" <=""/>

But in every other browser I tested (Chrome, Firefox and Opera), the notification div looks just like it should. I have no idea why IE does this operation so differently.

Any help would be greatly appreciated

Thanks

  • 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-26T14:03:42+00:00Added an answer on May 26, 2026 at 2:03 pm

    The issue is malformed HTML. Firefox and chrome tend to automatically close any missing close tags on HTML elements, but IE will not.

    Here is your issue:

    <img src='content/images/deleteNotification.png'</a>
    

    It should be:

    <img src='content/images/deleteNotification.png' /></a>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this function which gets some variables and adds shadow to them, and
So I have a function in unmanaged c++ that gets called when some text
Following some examples, I have a function that gets triggered on the 'register_deactivation_hook'. This
I currently have a function that gets some data from the database and puts
In my Java code I have function that gets file from the client in
I have a function that gets x(a value) and xs(a list) and removes all
I have written a function that gets a given number of random records from
So I have this function that gets data from database and echoes it. The
I have a function that is called some large number of times, and eventually
I have a function that tracks the user's mouse to show them visually where

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.