Closed stemaste62 closed 3 years ago
If I understand correctly, you want to pass the id of the currently selected value to works.php?
Why don't you grab that id and send it in your query by using a function target instead of the url string.
See:
// target as a function example
$(".editable-text-full").editable(function(input, settings, elem) {
console.log(input);
console.log(settings);
console.log($(elem).data('test'));
}, {});
Thanks for your time, but I'm afraid I don't understand. I have to send the current select before the new selection is made. When I recover the possibilities from the Json file, precisely. I saw that example in the manual, but I didn't understand how to make it work for me I think this is a basic functionality to use input select in a dynamic page. Instead it is so complicated ;-) sorry, but I'm not a very good programmer. Since the value of the input select does not appear in html, but only the value.text, the only way is to go and see what is written in the DB. For this I thought of sending the id directly to the program that generates the json file, because html id is id of db record for me.
https://intra.kiwynet.com/works.asp?q_act=READWORKS&q_id=845 https://intra.kiwynet.com/works.asp?q_act=READWORKS&q_id=572
another way to prepare a key in html span as optionvalue = "BLD" to be read by the function, it would be the best thing
do I tell lies?
analyzing the function thoroughly I found that loadurl also sends a series of parameters including the id, so for me it is enough
qact=READWORKS&0=q&1=&2=i&3=d&4=%3D&5=5&6=7&7=2&pk=845&_=1614789130874
Thank you for any help
ok great!
Hi, I use this code: https://codepen.io/stemaste/pen/mdOKRWP
the example codepen not work because the ajax page not exixsts in example, but I assure you that it works regularly except that I cannot pass the current selection to works.php so that it returns me the correct values in json for example: {'ART':'Artist','BLD':'Builder','FRM':'Farmer','selected':'BLD'}
I would like to pass the id because so I can see what is written in the db. Or is there some other way?
I tested value: but without success, i tried to insert a function in loadurl: but it is not supported apparently
any idea? Thank you for nay help