codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Adding values to text field from popup - JavaScript  DanielleDee at 23:33 on Thursday, July 29, 2004
 

Hi All



I need to do the following in javascript:



I have a text field with a "format" button. When the button is clicked a

popup opens with say 3 checkbox options: paragraph, bold, underline. The user can then enter

text in the text box and apply formatting to the text entered. When the popup results are submitted, it should be displayed in the textbox as something like this:



<p><b>bold</b> text here </p>



By default <p> should come before <b> and <b> should come before <u> and </u></b></p> should come after the entered text.



I figured out how to populate a text box by clicking a button, but the values are all either added AFTER text or overwrites the text.



It would also help if the attributes could be added at CURSOR point with the click of a button or applied only to highlighted text.



Anyone have an idea how to apply this?



Thanx!












CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  How to open a .DOC file in MS-Word thru a link
•  Export database`s data into a CSV file in jspscript.....
•  Adding values to text field from popup - JavaScript
•  How to insert Javascript within Javascript ?
•  Event Close Browser botton
•  setting alphanumeric code
•  syntax error in insert statement .please help me solve it
•  Re: need code to export html report to excel and autosave with current date as filenaem
•  Re: DHTML drop down menu


Recent Articles
Simple Thumbnail Solution
Type Anywhere
A Better Moustrap: FmtDate to replace FormatDateTime
ASP.NET Forum Source Code
Internal Search Engine
Javascript Growing Window
Simple date validation
Search engine friendly URLs using ASP.NET (C#.NET)
Function to Return Alpha Characters Only
The OSI Reference Model - A Clear and Concise Illustration !


Site Survey
Help us serve you better. Take a five minute survey. Click here!

© Copyright codetoad.com 2001-2004