This one is strange to me:
I am trying to set up this app so when the user selects the .gif it will call the onClick function and in that function it switches .gifs. I am also setting up an array for something else. When I place the code for the array in this file, I get a "Type mismatch error"; Fine, its incorrect. But the onClick function will work. When I comment the array code out, it won't work. The 2 should not have an effect on each other right??
Here is the code:
<%
Dim testArray(5)
Dim temp
Dim counter
for counter=0 to 4
temp=testArray(counter)
Response.Write temp
next
Response.Write("<TD><INPUT TYPE=Image "
Response.Write("ID=folderIcon IMG _ SRC='icons/icon_closedfolder.gif'"
Response.Write("onClick='switchIcon()'>"
Response.Write oSubFolder.name
Response.Write ("</TD>"
Response.Write ("<TD> </TD>"
Response.Write ("</TR>" & vbCrLf)
%>
<HEAD>
<SCRIPT language="JavaScript">
function switchIcon()
{
folderIcon.src="icons/icon_openfolder.gif";
window.alert("did you get here?"
;
}
</SCRIPT>
<TITLE> Whatever</TITLE>
</HEAD>
Much Thanks,
I am trying to set up this app so when the user selects the .gif it will call the onClick function and in that function it switches .gifs. I am also setting up an array for something else. When I place the code for the array in this file, I get a "Type mismatch error"; Fine, its incorrect. But the onClick function will work. When I comment the array code out, it won't work. The 2 should not have an effect on each other right??
Here is the code:
<%
Dim testArray(5)
Dim temp
Dim counter
for counter=0 to 4
temp=testArray(counter)
Response.Write temp
next
Response.Write("<TD><INPUT TYPE=Image "
Response.Write("ID=folderIcon IMG _ SRC='icons/icon_closedfolder.gif'"
Response.Write("onClick='switchIcon()'>"
Response.Write oSubFolder.name
Response.Write ("</TD>"
Response.Write ("<TD> </TD>"
Response.Write ("</TR>" & vbCrLf)
%>
<HEAD>
<SCRIPT language="JavaScript">
function switchIcon()
{
folderIcon.src="icons/icon_openfolder.gif";
window.alert("did you get here?"
}
</SCRIPT>
<TITLE> Whatever</TITLE>
</HEAD>
Much Thanks,