Click here to Skip to main content
15,889,343 members
Home / Discussions / JavaScript
   

JavaScript

 
Questionpage loading Pin
Member 79044828-Feb-12 20:22
Member 79044828-Feb-12 20:22 
QuestionNeed Help Setting <img> src attribute Pin
PianoMan7-Feb-12 5:26
PianoMan7-Feb-12 5:26 
AnswerRe: Need Help Setting src attribute Pin
Dean Oliver7-Feb-12 6:40
Dean Oliver7-Feb-12 6:40 
GeneralRe: Need Help Setting src attribute Pin
PianoMan7-Feb-12 16:24
PianoMan7-Feb-12 16:24 
GeneralRe: Need Help Setting src attribute Pin
Dean Oliver7-Feb-12 21:56
Dean Oliver7-Feb-12 21:56 
AnswerRe: Need Help Setting src attribute Pin
Mohibur Rashid7-Feb-12 18:12
professionalMohibur Rashid7-Feb-12 18:12 
AnswerRe: Need Help Setting src attribute Pin
twseitex19-Feb-12 2:50
twseitex19-Feb-12 2:50 
QuestionImages Won't display in IE 7 Pin
PianoMan5-Feb-12 6:27
PianoMan5-Feb-12 6:27 
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!
XML
<!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 Pin
Richard MacCutchan5-Feb-12 23:23
mveRichard MacCutchan5-Feb-12 23:23 
GeneralRe: Images Won't display in IE 7 Pin
PianoMan6-Feb-12 4:15
PianoMan6-Feb-12 4:15 
GeneralRe: Images Won't display in IE 7 Pin
Richard MacCutchan6-Feb-12 4:30
mveRichard MacCutchan6-Feb-12 4:30 
GeneralRe: Images Won't display in IE 7 - SOLVED Pin
PianoMan6-Feb-12 4:43
PianoMan6-Feb-12 4:43 
GeneralRe: Images Won't display in IE 7 - SOLVED Pin
Richard MacCutchan6-Feb-12 5:31
mveRichard MacCutchan6-Feb-12 5:31 
AnswerRe: Images Won't display in IE 7 Pin
jsc4214-Feb-12 3:41
professionaljsc4214-Feb-12 3:41 
AnswerRe: Images Won't display in IE 7 Pin
twseitex19-Feb-12 2:59
twseitex19-Feb-12 2:59 
QuestionProblem with args.isValid in JS Pin
dayakar_dn1-Feb-12 22:14
dayakar_dn1-Feb-12 22:14 
AnswerRe: Problem with args.isValid in JS Pin
Mohibur Rashid1-Feb-12 22:36
professionalMohibur Rashid1-Feb-12 22:36 
GeneralRe: Problem with args.isValid in JS Pin
dayakar_dn1-Feb-12 23:03
dayakar_dn1-Feb-12 23:03 
GeneralRe: Problem with args.isValid in JS Pin
Mohibur Rashid1-Feb-12 23:10
professionalMohibur Rashid1-Feb-12 23:10 
Questionupdate several DIV using javascript with mysql data Pin
Sergio8430-Jan-12 10:09
Sergio8430-Jan-12 10:09 
AnswerRe: update several DIV using javascript with mysql data Pin
Mohibur Rashid7-Feb-12 19:38
professionalMohibur Rashid7-Feb-12 19:38 
QuestionJQuery.ajax not working Pin
Ali Al Omairi(Abu AlHassan)30-Jan-12 0:23
professionalAli Al Omairi(Abu AlHassan)30-Jan-12 0:23 
AnswerRe: JQuery.ajax not working Pin
Manfred Rudolf Bihy30-Jan-12 4:21
professionalManfred Rudolf Bihy30-Jan-12 4:21 
GeneralRe: JQuery.ajax not working Pin
Ali Al Omairi(Abu AlHassan)30-Jan-12 5:18
professionalAli Al Omairi(Abu AlHassan)30-Jan-12 5:18 
GeneralRe: JQuery.ajax not working Pin
Not Active30-Jan-12 5:40
mentorNot Active30-Jan-12 5:40 

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

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