Please enable / Bitte aktiviere JavaScript!
Veuillez activer / Por favor activa el Javascript![ ? ]
Variable not added a question mark? - Q&A

Variable not added a question mark?

0 like 0 dislike
There is such code
$(".service_delete").click(function(){ let id_hash = $(this).data('dataname'); // read data into a variable var hd = $(this); var hd2 = "."+id_hash; console.log(id_hash); $.ajax({ url: "/php/service_delete.php", type: "POST", data: {"id_hash": id_hash}, success: function(){ hd.hide(); $(hd2).hide(); } }) })

when you have deleted the item.

When id_hash write the string without the ?/$ such signs that clearly works, but when I add such marks gives an error.

Help please, what to do?
asked by | 37 views

1 Answer

0 like 0 dislike
Each parameter to encode that special characters are correctly perceived by the server

p.s. didn't notice the comments. The error above ajax request is obtained, because the point is wrapped in double quotes, try single quotes.
answered by
Welcome to Bug-code Q&A, where you can ask questions and receive answers from other members of the community.

24.8k questions

46.2k answers


12.3k users

24,788 questions
46,220 answers
12,337 users