SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
-
Jun 30, 2007, 02:57 #1
- Join Date
- Sep 2006
- Posts
- 398
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
trying to edit this script so that it adds text to two textareas in the same form
anyone know how i could edit this script so that it adds text (bold, italic, etc) to two textareas in the same form
at the moment, it only seems to add the text to the first textarea, and the most descriptive names werent used so im having a hard time figuring this out
http://www.board-source.com/wysiwyg.html
thanks
-
Jun 30, 2007, 06:03 #2
The script is designed to work on one form; it finds the textarea by the name 'code'. What you need to do is redesign it so that AddText takes the textarea as a parameter instead of the form:
Code HTML4Strict:<input type="button" onclick="AddText(this.form.code,1);" value="big"/>
And change the value directly:
Code JavaScript:form.value+=AddTxt; lixlpixel_live_preview(form.value); form.focus();
Saul
Bookmarks