I've got a comment posting script, written in PHP, that is loaded into an AJAX div. On that form are a bunch of smilies that when you click on one, it adds the special code into the textbox above, simple enough. Problem is, this only works when the page is NOT loaded into the AJAX div. It attempts to locate the form similar to the psuedo code below:
Code:
document.forms['formname'].mytextbox.value+=smilie
Of course, with AJAX, in the 'document' this form doesn't show up. The HTML code views it as an empty div even though something is filled in there. Could anyone tell me the proper way of reaching the textbox? I've tried all sorts of methods so far with no success.
Thank you!
|