Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi Plz ,

See This code


JQUERY FUNCTION
function getData(val, val1) {
           // $('#dialog').load('cata_view.php?id=' + val);

 
           setid = document.getElementById("lblqq").value;
           alert(val);
 
           if (setid == "") {
               setid = val1;
           }
           else {
               setid = setid + "," + val1;
 
           }
}
 

DATALIST ONCLIENTCLICK FUNCTION
 

 
 <asp:DataList ID="list_display" runat="server" RepeatColumns="1" Style="width: 100%;
                                float: left; top: 0px; left: 0px; border-left: 1px solid gray; border-bottom: 1px solid gray;
                                border-right: 1px solid gray; border-top: 1px solid gray;" CellPadding="3" Font-Size="12px"
                                BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px"
                                ForeColor="Black" GridLines="Vertical">
                                <itemtemplate>
                                    <div style="width: 100%; float: left;">
                                        <div style="width: 100%; float: left;">
                                            <div style="float: left; width: 100%; border: solid 1px #ccc;">
                                                <h3 class="hd3">
                                                    <div style="float: left;">
                                                        <span id="budget11_exp_col" class="redirect-rt filter expnd" title="expand"></span>
                                                    </div>
                                                    <table>
                                                        <tr>
                                                            <td width="150px" align="center">
                                                                <%# DataBinder.Eval(Container.DataItem, "bus_travaller")%>
                                                                <asp:Label ID="lblbusid" runat="server" Text=' <%# DataBinder.Eval(Container.DataItem, "bus_id")%>'>
                                                            </td>
                                                            <td width="150px" align="center">
                                                                <%# DataBinder.Eval(Container.DataItem, "bus_Type")%>
                                                            </td>
                                                            <td width="120px" align="center">
                                                                <%# DataBinder.Eval(Container.DataItem, "journey_start_time")%>
                                                            </td>
                                                            <td width="150px" align="center">
                                                                <%# DataBinder.Eval(Container.DataItem, "destination_reach_time")%>
                                                            </td>
                                                            <td width="200px" align="center">
                                                                <%# DataBinder.Eval(Container.DataItem, "bus_features")%>
                                                            </td>
                                                            <td width="100px" align="center">
                                                                <%# DataBinder.Eval(Container.DataItem, "fare")%>
                                                            </td>
                                                            <td width="100px" align="center">
                                                                <asp:Button ID="getset" runat="server" OnCommand="getset_Command" OnClick="getset_Click"
                                                                    Text='<%# DataBinder.Eval(Container.DataItem, "Availability")%>' />
                                                                <asp:Label ID="busfrom" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Bus_from")%>'>
                                                            </td>
                                                            <asp:HiddenField ID="hdnImg" runat="server" Value='<%#Eval("total_seats") %>' />
                                                            <asp:LinkButton ID="lnk" runat="server" data-reveal-id="myModal" OnClick="lnk_Click"
                                                                OnClientClick='javascript:getData(41,1)'>Fade  and  Pop
                                                            
                                                        </tr>
                                                        <tr>
                                                            <td colspan="7">
                                                                <div id="getdiv"  runat="server">
                                                                </td></tr></table></h3></div>
                                                            
                                                        
                                                    
                                                
                                            </div>
                                        </div>
                                    
                                </itemtemplate>
                            
 

 
My problem is ,i am passing the datalist control "lblbusid" and "fare"  values to this method
 
OnClientClick='javascript:getData(lblbusid,fare)'
Posted 18-Jan-13 1:35am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 255
1 Sebastiaan Meijerink 141
2 Sergey Alexandrovich Kryukov 124
3 Abhinav S 94
4 Maciej Los 84
0 Sergey Alexandrovich Kryukov 6,558
1 OriginalGriff 6,288
2 Peter Leow 2,534
3 Abhinav S 2,358
4 Maciej Los 2,352


Advertise | Privacy | Mobile
Web03 | 2.8.150414.1 | Last Updated 18 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100