Hello,
Has anybody got experience working with javascript and asp (vbscript)? I am designing a page which builds up a table. If you click on a link in the table some extra information should arise (like a windows builing tree). The code, in pure js, without the asp part works fine, but now when I am trying to combine asp and js it is not working out. The code looks as follows:
call subHtmlhead
Response.Write("<table width='100%' border='1'>"
while not oRs.Eof
call subHtmltable
oRs.movenext
wend
Response.Write("</table></body></html>"
<%
sub subHtmlhead
'***********************************************************
'*Omschrijving: Samenstellen Head in HTML pagina
'***********************************************************%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>onload</title>
<script language="javascript">
var Open = ""
var Closed = ""
<!--
function preload(){
if(document.images){
Open = new Image()
Closed = new Image()
Open.src = "images/minnetje.gif"
Closed.src = "images/plusje.gif"
}
}
function showhide(what, what2){
if (what.style.display=="none"
{
what.style.display="" /*shows what is being shown*/
what2.src=Open.src /*shows an open or closed folder*/
}
else{
what.style.display="none"
what2.src=Closed.src
}
}
-->
</script>
</head>
<body onLoad="preload()">
<%
end sub
%>
<%
sub subHtmltable
'***********************************************************
'*Omschrijving: Samenstellen van de pagina
'***********************************************************
%>
<tr>
<td valign="top" align="right" width="3%" rowspan="2"><font face="Verdana" size="2">
<span id="menu1" onClick="showhide(menu1outline,menu1sign)"><img id="menu1sign" src="../images/plusje.gif"></span>
</font>
</td>
<td width="15%" valign="top"><%= oRs.fields("Zaakid"
%>
</td>
<td width="82%"><%= oRs.fields("Citeertitel"
%>
</td>
</tr>
<tr>
<td colspan="2">
<span id="menu1outline" style="display:'none'">Adviesopmerking<br>
Tekst over de eerste advies opmerking</span>
</td>
</tr>
<%
end sub
%>
When I click a folder to open I get an runtime error which tells me that style.object is not an object or is null.
Hope anybody has got any experience with this sort of problem!
Mario
Has anybody got experience working with javascript and asp (vbscript)? I am designing a page which builds up a table. If you click on a link in the table some extra information should arise (like a windows builing tree). The code, in pure js, without the asp part works fine, but now when I am trying to combine asp and js it is not working out. The code looks as follows:
call subHtmlhead
Response.Write("<table width='100%' border='1'>"
while not oRs.Eof
call subHtmltable
oRs.movenext
wend
Response.Write("</table></body></html>"
<%
sub subHtmlhead
'***********************************************************
'*Omschrijving: Samenstellen Head in HTML pagina
'***********************************************************%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>onload</title>
<script language="javascript">
var Open = ""
var Closed = ""
<!--
function preload(){
if(document.images){
Open = new Image()
Closed = new Image()
Open.src = "images/minnetje.gif"
Closed.src = "images/plusje.gif"
}
}
function showhide(what, what2){
if (what.style.display=="none"
what.style.display="" /*shows what is being shown*/
what2.src=Open.src /*shows an open or closed folder*/
}
else{
what.style.display="none"
what2.src=Closed.src
}
}
-->
</script>
</head>
<body onLoad="preload()">
<%
end sub
%>
<%
sub subHtmltable
'***********************************************************
'*Omschrijving: Samenstellen van de pagina
'***********************************************************
%>
<tr>
<td valign="top" align="right" width="3%" rowspan="2"><font face="Verdana" size="2">
<span id="menu1" onClick="showhide(menu1outline,menu1sign)"><img id="menu1sign" src="../images/plusje.gif"></span>
</font>
</td>
<td width="15%" valign="top"><%= oRs.fields("Zaakid"
</td>
<td width="82%"><%= oRs.fields("Citeertitel"
</td>
</tr>
<tr>
<td colspan="2">
<span id="menu1outline" style="display:'none'">Adviesopmerking<br>
Tekst over de eerste advies opmerking</span>
</td>
</tr>
<%
end sub
%>
When I click a folder to open I get an runtime error which tells me that style.object is not an object or is null.
Hope anybody has got any experience with this sort of problem!
Mario