Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code is acting strange..

Status
Not open for further replies.

golyg

Programmer
Jul 22, 2002
319
US
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(&quot;<TD><INPUT TYPE=Image &quot;)
Response.Write(&quot;ID=folderIcon IMG _ SRC='icons/icon_closedfolder.gif'&quot;)
Response.Write(&quot;onClick='switchIcon()'>&quot;)
Response.Write oSubFolder.name
Response.Write (&quot;</TD>&quot;)
Response.Write (&quot;<TD>&nbsp;</TD>&quot;)
Response.Write (&quot;</TR>&quot; & vbCrLf)
%>

<HEAD>
<SCRIPT language=&quot;JavaScript&quot;>
function switchIcon()
{
folderIcon.src=&quot;icons/icon_openfolder.gif&quot;;
window.alert(&quot;did you get here?&quot;);
}
</SCRIPT>
<TITLE> Whatever</TITLE>
</HEAD>



Much Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top