How Can I Display Value Of A Div With A Button Click?
I am currently working with a wmd editor and jQuery-UI tabs. I have created an ajax/js function that will submit (when next button is clicked) the wmd-preview value and then php ec
Solution 1:
PHP code should start with <?php
, yours start with <?
which is incorrect.
When you see PHP code presented as text - it should tell you it is not running, this is why you keep getting output like '.$wmd.''); } ?>
instead of real PHP echo output.
The other comment still stands as well - you should either use $("#wmd-preview").html()
or $("#wmd-input").val()
but you cannot use val
on divs, it does not work.
In this scenario $("#wmd-input").val()
is the better choice just because this is the reason input
fields exist - to get input.
Let me know if there are more questions I can help with.
Post a Comment for "How Can I Display Value Of A Div With A Button Click?"