F
fishinsanluis
I am having issues with a new window that I create in my application
not executing its Javascript. The js is there in the source and looks
all normal, but it is simply not being recognized. I am running on
Jboss 4.0.2. Here is the code, its simple...
<SCRIPT LANGUAGE="JavaScript">
alert("building image array...");
var image=new Array();
var imageName=new Array();
var name="";
var index=0;
var offset=0;
var isAutoFit=false;
image[0]="\unassociated\DSC00034.JPG";
imageName[0]="DSC00034.JPG";
... (i took this out for brevity's sake, its just populating an
array)
image[29]="\unassociated\SearchVerity";
imageName[29]="SearchVerity";
function autoFit(){
var windowWidth;
if ( isAutoFit ) {
if ( document.body.clientWidth ) {
windowWidth=document.body.clientWidth;
}
else if ( window.innerWidth ) {
windowWidth=window.innerWidth;
}
document.imageGallery.imageslider.width=windowWidth-5;
}
}
function backward(){
if (index > 0){
index--;
}
else {
index=image.length-1;
}
document.imageGallery.imageslider.src=image[index];
document.imageGallery.shortName.value=imageName[index];
}
function forward(){
alert("wow");
if (index < image.length-1) {
index++;
}
else {
index=0;
}
document.imageGallery.imageslider.src=image[index];
document.imageGallery.shortName.value=imageName[index];
}
-->
</SCRIPT>
</HEAD>
<BODY onResize="autoFit()" dir="ltr" bgcolor="#FFFFFF"
style="margin-top:1;margin-bottom:1;margin-left:0;margin-right:0">
<FORM name="imageGallery" method="post">
<TABLE class="report-table" width="100%" border="0"
cellpadding="0" cellspacing="0" dir="ltr">
<TR>
....
<TD class="button-bar-top">
<INPUT class="button-bar-button" type="button" name="backPb"
value="<<Back" onClick="javascript:backward();">
<INPUT class="button-bar-button" type="button" name="nextPb"
value="Next>>" onClick="javascript:forward();">
</TD>
</TR>
</TABLE>
....
thats it...anyone see anything that woulld make it not work? It is in
a window that is opened from a button in the main window, and the html
is dynamically crated using a jsp.
not executing its Javascript. The js is there in the source and looks
all normal, but it is simply not being recognized. I am running on
Jboss 4.0.2. Here is the code, its simple...
<SCRIPT LANGUAGE="JavaScript">
alert("building image array...");
var image=new Array();
var imageName=new Array();
var name="";
var index=0;
var offset=0;
var isAutoFit=false;
image[0]="\unassociated\DSC00034.JPG";
imageName[0]="DSC00034.JPG";
... (i took this out for brevity's sake, its just populating an
array)
image[29]="\unassociated\SearchVerity";
imageName[29]="SearchVerity";
function autoFit(){
var windowWidth;
if ( isAutoFit ) {
if ( document.body.clientWidth ) {
windowWidth=document.body.clientWidth;
}
else if ( window.innerWidth ) {
windowWidth=window.innerWidth;
}
document.imageGallery.imageslider.width=windowWidth-5;
}
}
function backward(){
if (index > 0){
index--;
}
else {
index=image.length-1;
}
document.imageGallery.imageslider.src=image[index];
document.imageGallery.shortName.value=imageName[index];
}
function forward(){
alert("wow");
if (index < image.length-1) {
index++;
}
else {
index=0;
}
document.imageGallery.imageslider.src=image[index];
document.imageGallery.shortName.value=imageName[index];
}
-->
</SCRIPT>
</HEAD>
<BODY onResize="autoFit()" dir="ltr" bgcolor="#FFFFFF"
style="margin-top:1;margin-bottom:1;margin-left:0;margin-right:0">
<FORM name="imageGallery" method="post">
<TABLE class="report-table" width="100%" border="0"
cellpadding="0" cellspacing="0" dir="ltr">
<TR>
....
<TD class="button-bar-top">
<INPUT class="button-bar-button" type="button" name="backPb"
value="<<Back" onClick="javascript:backward();">
<INPUT class="button-bar-button" type="button" name="nextPb"
value="Next>>" onClick="javascript:forward();">
</TD>
</TR>
</TABLE>
....
thats it...anyone see anything that woulld make it not work? It is in
a window that is opened from a button in the main window, and the html
is dynamically crated using a jsp.