Last post Jul 01, 2019 05:38 PM by PatriceSc
Jul 01, 2019 06:28 AM|jsshivalik|LINK
<a id="lnkReject" runat="server" class="btn btn-danger btn-xs" onclick='editPop()'><i class="fa fa-ban"></i></a>
Jul 01, 2019 03:26 PM|PatriceSc|LINK
Either editPop() is not found at all or it is entered but "doesn't work". Use F12 Console in your browser to see what happens.
I suggest very often to NOT read the code to understand what happens (you can often find multiple possible problems and still can't know for sure which one happens) but to use this kind of debugging tools to SEE which one happens.
And once you know which problem happens it is often quite easy to fix.
Edit: ah and I even forgot the 3rd possible problem ie IMO you can't click a link with no href. Try to add href="#" and see then if editPop is called.
Jul 01, 2019 04:22 PM|jsshivalik|LINK
Removing quotes or in double quotes then it works
Jul 01, 2019 05:38 PM|PatriceSc|LINK
Don't remove quotes. AFAIK since HTML 4, using double or single quotes for attributes is required (and both worked for me).
Actually I was trying to reproduce the problem you had as it might be a nice case for showing the use of F12 Console. Which browser are you using ?
- I'm wrong about HTML 4. They suggest to always quote attributes but it is not required (and apparently it is the same in HTML 5)
- BTW a problem I see sometimes with the ' character is ending with a character that looks like this character but isn't really this one (and so usually you delete and retype the line and then apparently without any change it starts to work). Could it be the
issue you ran into ?