Hi,
I'm trying to use a javascript function passing a vb variable. I don't
understand why it doesn't work.
Can someone help me?
Thanks in advance.
Here is my javascript function used to show a text:
<script language="javascript">
function montre(id, shtml) {
if (document.getElementById) {
document.getElementById(id).style.visibility =
'visible';
} else if (document.all) {
document.all[id].style.visibility = 'visible';
} else if (document.layers) {
document.layers[id].visibility = 'visible';
};
var el = (document.getElementById)?
document.getElementById(id): (document.all)? document.all[id]:
(document.layers)? document.layers[id]: null;
if (!el) return;
if (typeof el.innerHTML!="undefined") {
el.innerHTML = shtml;
} else if (document.layers) {
el.document.write(shtml);ol
el.document.close();
} }
</script>
Now here is my asp function calling the javascript function:
<%
function loopDatasNews(col,arrayName)
nRowCount = ubound(arrayName, 2)
For n=0 to nRowCount
Increm = arrayName(col,n)
response.write("<table
class=""tableNews""><tr><td>"&arrayName(col-1,n)&"</td></tr><tr><td
id='id"&n&"'>")
response.write("<a class=""read""
href=""javascript:;""
onclick=""montre('id"&n&"','"&Increm&"');"">readMo re</a></td></tr></table><B
R>") //the error is in this line of code!
Next
End Function
%>