![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| ||||||||
| ||||||||
|
|
Hello everyone, I have a script that runs in IE great, but in firefox it has problems. I understand that there are some objects that are accessed differently in IE and Mozilla. Can anybody let me know what I need to change in the file to make a copy that would run fine on Firefox? Here is the link to the file: http://people.emich.edu/srehman2/study/polls.html click on the 'Build Bars' link displayed at the top-right corner. I am copying the source code here also, ================================================== ======= script language="javascript" |
|
function BuildResults() { var str; var imageWidths = new Array(); |
|
var imageName = new Array(); var labelName = new Array(); var imageSize = 140; var BarImage = "images/poll_yellow.gif"; var t = new Array(); var color = new Array(); t[0] = 60; t[1] = 30; t[2] = 50; t[3] = 112; |
|
color[0] = 'red'; color[1] = 'blue'; color[2] = 'silver'; color[3] = 'green'; |
|
str = str + '<table cellspacing=2 cellpadding=0 border=0><tr><td>'; for(var i=0;i<t.length;i++) { imageWidths[i] = Math.round(imageSize * (Math.round(t[i])/100)); imageName[i] = "imageResult" + i; labelName[i] = "spanPercentage" + i; str = str + '<table cellspacing=2 cellpadding=0 border=0 height=4>'; str = str + '<tr><td bgcolor=' + color[i] + '><img name=' + imageName[i] + ' id=' + imageName[i] + 'src="images/pixel.gif" width=1 ----------------------^^-----------------^^^ |
|
height=1 border=0></td><td><span id=' + labelName[i] + '>' + Math.round(t[i]) + '%</span></td></tr>'; |
|
setTimeout("Wait()", 10); [...] |
|
function Wait() { //Wait for a second } |
#2
| |||
| |||
|
#3
| |||
| |||
|
|
-- Rob Group FAQ: <URL:http://www.jibbering.com/FAQ |
![]() |
| Thread Tools | |
| Display Modes | |
| |