Hello, me again. I'm making progress, but I'm having some issues passing some arguments to javascript. When I look at my code in my asp, it looks like this:
When I run my webpage and look at the source, it actually generated lines like this one for example:
My javascript function looks like this:
I can't for the life of me figure out why it's not passing through the argument correctly. To me when I look at the generated html code, it looks right to me. I thought for a while it had something to do with the quotes, but it just looks right to me.
According to IE, the errors I am getting are a whole bunch of Syntax errors:
Any idea what I'm doing wrong? To I have extra quotes some where? Not enough? Something else?
Code:
output.Append(" <td class='cell'><A id = 'displayText' HREF = '#' onclick='return hideDiv('" & strTargets & "');'>" & strTargets & "</A></td>" & vbNewLine)
When I run my webpage and look at the source, it actually generated lines like this one for example:
HTML:
<td class='cell'><A id = 'displayText' HREF = '#' onclick='return hideDiv('MarketingGroup');'>MarketingGroup</A></td>
My javascript function looks like this:
JavaScript:
<script type="text/javascript">
function hideDiv(str) {
document.getElementById("Results").style.visibility = "hidden";
document.getElementById("resultsIFrame").src = "aspdbsearchpage.aspx?idvalue=" + str
document.getElementById("AlertGroupResults").style.visibility = "visible";
}
</script>
I can't for the life of me figure out why it's not passing through the argument correctly. To me when I look at the generated html code, it looks right to me. I thought for a while it had something to do with the quotes, but it just looks right to me.
According to IE, the errors I am getting are a whole bunch of Syntax errors:
Code:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E; MS-RTC LM 8; Tablet PC 2.0)
Timestamp: Thu, 11 Oct 2012 20:18:41 UTC
Message: Syntax error
Line: 323
Char: 1
Code: 0
URI: [URL unfurl="true"]http://localhost:3892/AlertHistory/Default.aspx[/URL]
Any idea what I'm doing wrong? To I have extra quotes some where? Not enough? Something else?