I've gotten a lit ambitious and want to break free from WordPress with my site, so I've spent the last few days with XAMPP trying to get my post form functioning. For the most part I've been very successful, as I've had quite a bit of experience and training with php and mySQL databases. Where I'm lacking in skill is the Javascript department.
I have a page for uploading images that opens in a JS popup window, and once the images are uploaded you can click a link to insert it into a form field on the main page. My code for that looks like this:
Code:
<a href="javascript:void(window.opener.document.FORM.FIELD.value
= 'FILENAME' )">Insert into post</a>
The problem is that, currently, clicking the link will replace anything already in the form field. What I need it to do is insert the text at the cursor position without replacing anything.
I've scoured Google for a solution, but nothing I've found pertains to inserting the text from a popup window.
|