...

View Full Version : Newbie Question: Problem seeing function declaration



JayM
03-08-2005, 06:41 PM
hello..

i'm trying to call the following function from an OnCheckedChanged event from w/in my ASP.NET app.


<HEAD>
<title>SeNTReportInput</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<SCRIPT Language="JavaScript">
function checkboxVisible()
{
if(document.InputForm.SumViewChk.checked)
{
if(!document.InputForm.OrderNumChk.visible)
document.InputForm.OrderNumChk.visible = true);
if(!document.InputForm.CarrierChk.visible)
document.InputForm.CarrierChk.visible = true);
if(!document.InputForm.TstCtrChk.visible)
document.InputForm.TstCtrChk.visible = true);
}
</SCRIPT>
</HEAD>


i then call this function here:


<asp:CheckBox id="SumViewChk" style="Z-INDEX: 205; LEFT: 464px; POSITION: absolute; TOP: 336px" runat="server" Font-Names="Arial" Font-Size="Smaller" Text="Summary View" OnCheckedChanged="checkboxVisible()"></asp:CheckBox>

but get the following error:

c:\inetpub\wwwroot\SeNTReporter\SeNTReportInput.aspx(240,62): error CS0117: 'ASP.SeNTReportInput_aspx' does not contain a definition for 'checkboxVisible'

liorean
03-08-2005, 07:14 PM
I think you're trying to use a client side function server side...

JayM
03-09-2005, 06:05 AM
I think you're trying to use a client side function server side...
i think you're right.. i'm having trouble understanding how to implement javascript via an asp.net app. could you help figure out how to?

where does the javascript go? where do i put my code in the code-behind? etc..

i'd really appreciate any help on this.

glenngv
03-09-2005, 07:20 AM
This article (http://www.dotnetbips.com/displayarticle.aspx?id=263) shows you how to attach client-side event handler from server-side.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum