ajax retrieve text from db and replace inside wysiwyg
On selecting an option from a select list i would like to retrieve data (html content) from mysql db according to selection and then replace everything inside my wysiwyg with that data.
I know i can insert at selection a predefined value (just any old text):
(this is how i can take some text and add it inside the wysiwyg at the cursor)
How can i...
1/ do the ajax retrieve part?
2/ overwrite everything inside [this.selectedIndex]?
no worries, done it
have you check out some libaries like prototype, jquery or yui.
actually, i just used the tutorial from tizag.com Nice and simple ajax, 20 lines of code and a php file to do the query and echo the results