Javascript/HTML(Works in IE but not Firebird) FIXED!

PhoenixOfWater

Golden Member
Jul 8, 2002
1,583
0
0
Hi, like the title said, I have Javascript/HTML that works with IE but not Firebird.

I think it may have something to do with the form

Here my code
<script LANGUAGE=Javascript>
var stripNumber = 2;
var striplinks = new Array();
striplinks[0] = "comic_files/00000.gif";
striplinks[1] = "comic_files/00001.gif";
striplinks[2] = "comic_files/00002.gif";
// -->
</script>

<script LANGUAGE=Javascript>

function StripJump(strip)
{
if (strip != '')
{
stripNumber = strip
Name = striplinks[stripNumber];
document.comic.src = Name;

}
}

//-->
</script>

<script LANGUAGE=Javascript>

function StripBack()
{
if (stripNumber !=0)
{
stripNumber--;
Name = striplinks[stripNumber];
document.comic.src = Name;
}
}

function StripNext()
{
if (stripNumber != (striplinks.length - 1))
{
stripNumber++;
Name = striplinks[stripNumber];
document.comic.src = Name;
}
}


//-->
</script>





<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body>

<div id="header">
<h1>********.Com</h1>
<p id="description">comic browser

<select name=strip_id onChange='StripJump(this.options.value);'>
<option value=''>-- Pick a Comic --</option>

<option value='0'>December 04, 2003</option>
<option value='1'>December 06, 2003</option>
<option value='2'>December 08, 2003</option>
<--! Notes: -->

</select>
</form>

<a href="#" onClick="StripBack()">Back</a>
<a href="#" onClick="StripNext()">Next</a>




</div>

<img src="comic_files/00002.gif" width="549" height="429" Name = "comic">
 

PhoenixOfWater

Golden Member
Jul 8, 2002
1,583
0
0
hmm....here the thing... if i add one it move it to a line by its self... i need them to be all on one line
I just add it to see if it helps...and no...still the same...
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
You can't reference this.options.value.

Try this.options[this.selectedIndex].value.
 

PhoenixOfWater

Golden Member
Jul 8, 2002
1,583
0
0
Nice!!! thank you so much!!
one more thing
Is there a way to have it when i click "next" or "back" that the select with update itself?
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Replace

stripNumber--;
Name = striplinks[stripNumber];

with

stripNumber--;
document.forms[0].strip_id.options.selectedIndex = stripNumber;
Name = striplinks[stripNumber];

Repeat for StripNext()
 

PhoenixOfWater

Golden Member
Jul 8, 2002
1,583
0
0
Hmm...I copy and paste what you told me to replace but it make StripNext() and StripBack() stop work
any hints?
 

PhoenixOfWater

Golden Member
Jul 8, 2002
1,583
0
0
I got it to work
I used document.form.strip_id.options.selectedIndex = stripNumber+1;
and also add the <form name="form">

thank you very much MrChad