Rather than population said DOM object with an external page such as HTML CFM or PHP, what if I simply want to send text?
I've tried:
$("#myDOMObject").val("some text");
No errors, but the object value doesn't update either.
Rather than population said DOM object with an external page such as HTML CFM or PHP, what if I simply want to send text?
I've tried:
$("#myDOMObject").val("some text");
No errors, but the object value doesn't update either.
What element is "myDOMObject"? If it's a text input, your code should be working fine. If it's something else, use $("#myDOMObject").text("some text");
If you have a DOM object, you can simply do this:
jQuery(your_dom_object).text('Hello World!');
But, since you use jQuery anyway, I think you should just do
$('#the_id_of_your_dom_object').text('Hello World');
You can use any jQuery query instead of referencing the ID of the object directly. See the jQuery documentation for more details.