Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Mar 2005
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Newbie Question: Problem seeing function declaration

    hello..

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

    Code:
    <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:

    Code:
    <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'

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    Umeå, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    I think you're trying to use a client side function server side...
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    New Coder
    Join Date
    Mar 2005
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by liorean
    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.

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    This article shows you how to attach client-side event handler from server-side.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •