Click here to Skip to main content

JavaScript

   

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page  Show 
  Refresh
QuestionNeed Help Setting src attribute PinmemberPianoMan5:26 7 Feb '12  
AnswerRe: Need Help Setting src attribute PinmemberDean Oliver6:40 7 Feb '12  
GeneralRe: Need Help Setting src attribute PinmemberPianoMan16:24 7 Feb '12  
GeneralRe: Need Help Setting src attribute PinmemberDean Oliver21:56 7 Feb '12  
AnswerRe: Need Help Setting src attribute Pinmemberjohny1015198118:12 7 Feb '12  
AnswerRe: Need Help Setting src attribute Pinmembertwseitex2:50 19 Feb '12  
QuestionImages Won't display in IE 7 PinmemberPianoMan6:27 5 Feb '12  
Would someone please tell me why this js won't display images in IE 7, but works perfectly in Firefox? I'm using Windows XP, and I've double-checked all my settings in IE 7. Thanks!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Sample</TITLE>
 
<SCRIPT LANGUAGE="JavaScript">
window.onload = fnWrite;
 
function fnWrite()
{
  // Declare variables
  var vTable = document.createElement("TABLE");
  var vTBody = document.createElement("TBODY");
  var vRow, vCell, vDiv, vImg;
  var i;
 
  var images = new Array();
  images[0] = "images/treble_f1.JPG";
  images[1] = "images/treble_c1.JPG";
  images[2] = "images/treble_d1.JPG";
  images[3] = "images/treble_e1.JPG";
 
  // Insert vBody into vTable
  vTable.appendChild(vTBody);
 
  // Insert a row
  vRow = document.createElement("TR");
  vTBody.appendChild(vRow);
  vCell = document.createElement("TD");
  vRow.appendChild(vCell);
 
  // Insert images
  for (i=0; i<images.length; i++)
  {
    vDiv = document.createElement("DIV");
    vCell.appendChild(vDiv);
 
    vImg = document.createElement("IMG");
    vImg.src = images[i];
    vImg.setAttribute("alt", "image");
    vCell.appendChild(vImg);
  }
  // Insert the table
  vTableContainer.appendChild(vTable);
}
</SCRIPT>
 
</HEAD>
<BODY>
<H1>Javascript Won't Work in IE 7</H1>
<div id="vTableContainer"></div>
 
</BODY>
</HTML>

AnswerRe: Images Won't display in IE 7 PinmvpRichard MacCutchan23:23 5 Feb '12  
GeneralRe: Images Won't display in IE 7 PinmemberPianoMan4:15 6 Feb '12  
GeneralRe: Images Won't display in IE 7 PinmvpRichard MacCutchan4:30 6 Feb '12  
GeneralRe: Images Won't display in IE 7 - SOLVED PinmemberPianoMan4:43 6 Feb '12  
GeneralRe: Images Won't display in IE 7 - SOLVED PinmvpRichard MacCutchan5:31 6 Feb '12  
AnswerRe: Images Won't display in IE 7 Pinmemberjsc423:41 14 Feb '12  
AnswerRe: Images Won't display in IE 7 Pinmembertwseitex2:59 19 Feb '12  
QuestionProblem with args.isValid in JS [modified] Pinmemberdayakar_dn22:14 1 Feb '12  
AnswerRe: Problem with args.isValid in JS Pinmemberjohny1015198122:36 1 Feb '12  
GeneralRe: Problem with args.isValid in JS Pinmemberdayakar_dn23:03 1 Feb '12  
GeneralRe: Problem with args.isValid in JS Pinmemberjohny1015198123:10 1 Feb '12  
Questionupdate several DIV using javascript with mysql data PinmemberSergio8410:09 30 Jan '12  
AnswerRe: update several DIV using javascript with mysql data Pinmemberjohny1015198119:38 7 Feb '12  
QuestionJQuery.ajax not working PinmemberAli Al Omairi(Abu AlHassan)0:23 30 Jan '12  
AnswerRe: JQuery.ajax not working PinmvpManfred R. Bihy4:21 30 Jan '12  
GeneralRe: JQuery.ajax not working PinmemberAli Al Omairi(Abu AlHassan)5:18 30 Jan '12  
GeneralRe: JQuery.ajax not working PinmvpMark Nischalke5:40 30 Jan '12  
GeneralRe: JQuery.ajax not working PinmemberAli Al Omairi(Abu AlHassan)20:47 30 Jan '12  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Beta | 2.5.120517.1 | Last Updated 20 May 2012
Copyright © CodeProject, 1999-2012
All Rights Reserved. Terms of Use
Layout: fixed | fluid