how to pass values to called function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thirunavukarasukm
    New Member
    • May 2007
    • 21

    how to pass values to called function

    i used in this below code in usercontrol

    but error happen

    because the checkbox value didn't pass

    please help how to pass the checkbox value

    i try <!--onclick="checke dChanged(this,' checkbox')--> this line

    but the checkbox is runat=server

    so different value is generated in html view source code...

    so doesn't work this code...........


    function checkedChanged( PanelId,ChkID)
    {
    if(ChkID.checke d == true)
    {
    PanelId.style.b ackgroundColor= "Yellow";

    return true;

    }
    if(ChkID.checke d == false)
    {
    PanelId.style.b ackgroundColor= "YellowGree n";
    }
    return false;

    }


    <div id="Panel1" style="WIDTH: 64px; HEIGHT: 48px; BACKGROUND-COLOR: yellowgreen" onclick="checke dChanged(this,c heckbox) runat="server">
    <img id="imgcolor" style="WIDTH: 32px; HEIGHT: 31px" height="31" src="file:///\\system107\HIS \Images\seat2.j pg"
    width="32" align="middle" runat="server">
    <input type="checkbox" id="Checkbox1" name="Checkbox1 " runat="server">
    <label id="Label1" runat="server"> </label>
    </div>
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Moved from the Articles section.

    Comment

    Working...