Here is a snippet of the code that I'm working with:
<select class="form-select" id="topicId" name="topicId" onchange="javascript:
var data = $(':input[name]', '#dynamic-form').serialize();
$.ajax(
'ajax.php/form/help-topic/' + this.value,
{
data: data,
dataType: 'json',
success: function(json) {
var eng1 = document.querySelectorAll('input[type="text"]');
eng1[eng1.length-1].style.display = 'none';
}
});">
The issue arises with input[type="text"]
- the quotation marks surrounding text are causing complications, especially since the entire code block is already enclosed in quotes.
How can I resolve this problem effectively?
Do you have any suggestions?