Get value from thick box control

I have a hidden field on a thick box, when I close a thick one, I need to get the value of my hidden field when a closed thick box calls this method

function tb_remove(parent_func_callback) {
parent.document.getElementById('hdf').value// I need value of hidden field here

please tell me how can I get the hidden value of a field that is on a thick field?

for example, I have an abc page, I click on heyperlink from the abc page, then the xyz page opens like a thick box, on xyz thickbox I have a hidden hdf field name, now I click the thick box close button, tb_remove is called thickbox. js, I need to get the hdf value here in the js file in order to use it on the abc page.

thank

+3
source share
1 answer

Well, if I understood the question correctly, "hdf" is the identifier of the hidden field, so this will give you a value then ... If I misunderstood, let me know.

I guess a thick box means you want control inside an iframe or something similar ... that’s how.

var hdfVal = $('#myIFrameID').contents().find('#hdf').val();

Or just just need to get the control value by ID ...

var hdfVal = $('#hdf').val();
+5
source

Source: https://habr.com/ru/post/1743174/


All Articles