Ajax Cascade option unable to read value from HTML - Javascript

Confluence User - 10 Jan, 2022

Greetings all,


Ajax Cascade option (Dynamic Cascading Drop-Down List) unable to retrive the value holds inside a text field where the value of the text field is being set by Javascript (Javascript API).


For example: 

<script>

$('#textField1').val('I want to retreive this');

</script>


Field Id to Control Available Options Based on Grouping: textField1

I'm using List selection (JDBC) for this AJAX calling where ( ? ) doesn't retrieve anything from textField1.

Both works fine individually but not working when intergrated togather.


Any help will be much appreciated.

javascript;forms;ajax;jdbcbinder

2


12 Jan, 2022
confluenceUser
1
confluenceUser

Try to use 

FormUtil.getField("textField1").val("aaa");

instead of the original code that you have.

Then, follow up with.

FormUtil.getField("textField1").trigger("change");

So that the cascading code will trigger.

13 Jan, 2022
confluenceUser
confluenceUser

It worked! Thank you so much

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print