Link to home
Start Free TrialLog in
Avatar of Peter Chan
Peter ChanFlag for Hong Kong

asked on

Problem to delete record

Hi,
Further to this
https://www.experts-exchange.com/questions/29042667/Add-button.html?anchor=a42220705¬ificationFollowed=192653361&anchorAnswerId=42220705#a42220705

I adjust the column name in Javascript but the problem persists (I cannot delete the record), after re-deployment.
ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Peter Chan

ASKER

I have done such change but I still cannot delete the record, after re-deployment.
above, I put

var houseIdToDelete= $(this).data("house-id");

Open in new window


but you added

var houseIdToDelete = $(this).attr("house-id");

Open in new window


you should use

var houseIdToDelete= $(this).data("house-id");

or

var houseIdToDelete= $(this).atrb("data-house-id");

not

var houseIdToDelete= $(this).attrb("house-id");
i did not get what you are asking for

for reference, site is
http://my-friend.co/Test_rec4/Default.aspx?userid=mc23
Sorry, is it correct to get value of one Label field using this line below?

var site_lang = document.getElementById("lb_site_lang");

Open in new window


while lb_site_lang is the Label field name.
I dont see such element on the page...

also this is wrong

var site_lang = document.getElementById("<%= lb_site_lang.ClientID %>").innerHTML;

Open in new window

>>> ClientID  > ClientId
var site_lang = document.getElementById("<%= lb_site_lang.ClientId %>").innerHTML;

Open in new window


it is in a js file and I dont think lb_site_lang.ClientId will be available... it will fail this way...
I have these
        success: function (response) {
            //var site_lang = document.getElementById("lb_site_lang");
            var site_lang = document.getElementById("<%= lb_site_lang.ClientID %>").innerHTML;
            var html = "";
    ...
    <asp:Label ID="lb_site_lang"
        Visible="false"
        Style="display: none"
        Font-Names="Times New Roman" 
        Font-Size="11pt" 
        Font-Bold="true"
        ForeColor="DarkBlue"
        ClientIDMode="Static"
        runat="server" />

Open in new window

but there is now a problem on the page to show the list, after this adjustment
1. there is no such element on the page
2. you cannot use <%= ... %> on a js file
again, original question is resolved...
and you keep adding new things and get new issues...
each time you should open a new question...