Debt Consolidation - Wordpress Themes - Free Ecards - Debt Consolidation - Debt Consolidation

PDA

View Full Version : Insertion into textarea


JordanStreet
Jun 11th 2007, 7:32 am
I have a button next to a textarea when they click that button it launchs another window. Now I need another button that will take a value (it will be an html code) close that window, and put that value in the textarea.

Sort of like how when you click the link button in this wysiwyg editor it pops up a window that asks for some stuff and then inserts it here.

Any help is much appreciated,
thanks,
Jordan

ziffgone
Jun 11th 2007, 1:16 pm
You can access your web page's textarea, (the one from where the pop-up was opened from), like so:


window.opener.[FORMNAME].[TEXTAREANAME].value= ~variable~

Replace "[FORMNAME]" with the actual form's name and likewise for the textarea. Replace "~variable~" with whatever variable you are passing to the textarea.

Hope that helps. :)

Perry.

JordanStreet
Jun 11th 2007, 2:44 pm
awsome man thanks a bunch :)