Click here to Skip to main content
13,001,159 members (57,676 online)
Rate this:
Please Sign up or sign in to vote.
See more:
function not getting call on page

.js code

$('table').delegate('td.EditRow','click',function () {
        var $row = this;
        var userid = $;
            type: "POST",
            url: "User_Create_Update.aspx/FillData",
            data: "{'userid': " + userid + "}",
            contentType: "application/json; charset=utf-8",            
            success: function (msg) {
                if (msg.d != '') {
            lightboxSpeed: 1000,
            centered: true,
            closeClick: true,
            closeEsc: true

.vb code
<WebMethod()> Public Shared Function FillData(userid As String) As DataTable

       Dim dt As DataTable = clsUSRM.GetAllById(userid)
       If dt.Rows.Count > 0 Then
           clsUSRM.USRM_USER_CD = userid
           clsUSRM.USRM_USER_NAME = dt.Rows(1).ToString()
       End If
       Return dt
   End Function
Posted 29-Jan-13 21:44pm
Updated 29-Jan-13 22:34pm
JemiM 30-Jan-13 4:17am
is FillData is a webservice method?
JemiM 30-Jan-13 4:22am
what is the URL while browsing?
sayedfarhan 30-Jan-13 4:42am
sayedfarhan 30-Jan-13 4:32am
this is a url
sayedfarhan 30-Jan-13 4:33am
yes FillData is webmethod
JemiM 30-Jan-13 5:27am
Please browse the service url that you have passed as ajax URL and verify it.
sayedfarhan 30-Jan-13 5:45am
jemiM sry i am not getting it please will u elaborate
JemiM 30-Jan-13 6:02am
I have posted a sample.please go through it
JemiM 30-Jan-13 6:05am
Change the question also. User's can't understand your actual issue
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Please go though the script and please put url like below
<script type="text/javascript">
$(function() {
$('input[id$=btnPull]').click(function(e) {
type: "POST",
url: "../Services/EmployeeList.asmx/FetchEList",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
var orders = msg.d;
if (orders.length > 0) {
else {
$("#tbl").text("No records found");
error: function(XMLHttpRequest, textStatus, errorThrown) {
function CreateTable(msg) {
null, { filter_data: false });
</script><pre lang="Javascript">

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170624.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2017
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