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

  • Home
  • SEARCH
  • 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 112819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:36:17+00:00 2026-05-11T02:36:17+00:00

Im trying to get pretty.js to prettify code in CODE tags, using this js:

  • 0

Im trying to get pretty.js to prettify code in CODE tags, using this js:

onload_functions.push(function() {     var node_list=document.getElementsByTagName('code');     for (i=0; i < node_list.length; i++) {         node_list[i].setAttribute('class','prettyprint');     }     prettyPrint(); }); 

This works fine for Firefox 🙂 but IE’s having none of it. What am i doing wrong?

You can see it (non)working at http://sam.xnet.tk

  • 1 1 Answer
  • 1 View
  • 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. 2026-05-11T02:36:18+00:00Added an answer on May 11, 2026 at 2:36 am

    If the code element has any other class names, this will yield chaos in IE. Using the (IE-specific) JavaScript property className will likely work. I commented on the onload function on your website. Btw, the way you embed the JavaScript it will break future standard-compatible browsers, see the W3C validator’s output for your site. The easiest solution is to move the code to an external file.

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

Sidebar

Ask A Question

Stats

  • Questions 73k
  • Answers 73k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer It is probably blocking on the call to connect, after… May 11, 2026 at 2:08 pm
  • added an answer From my understanding of MVC, the second version is more… May 11, 2026 at 2:08 pm
  • added an answer Have you googled for O(kn logk) ? That seems to… May 11, 2026 at 2:08 pm

Related Questions

I'm trying to get something very subtle to work, it looks pretty awful right
Im trying to get into some basic JavaFX game development and I'm getting confused
Im trying to get a completly data copy from a gridview, itryed clone(), tryed
i have a label in my form, and im trying to get the value
I'm trying to convert Matt Berseth's ' YUI Style Yes/No Confirm Dialog ' so
I've got a WordPress powered blog that I'm trying to get setup on our
I'm trying to get the {smartassembly} .NET obfuscator to work with my system. I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.