Current location: Hot Scripts Forums » General Web Coding » JavaScript » Adding values to text field from popup - JavaScript


Adding values to text field from popup - JavaScript

Reply
  #1 (permalink)  
Old 07-28-04, 08:54 PM
danielle_dee danielle_dee is offline
New Member
 
Join Date: Jul 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Adding values to text field from popup - JavaScript

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!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
retieveing selected date from a calendar popup using javascript into datetext field yusufoladele JavaScript 1 11-27-06 04:43 AM
Disable form fields to be submitted RickyRod JavaScript 2 05-24-04 10:15 AM
HELP, Populate text field furious JavaScript 1 04-09-04 09:12 PM
MySQL Query problem Wraith PHP 5 03-06-04 05:16 PM
picking random entries with a filter... Double selection problem dsumpter PHP 7 11-16-03 07:19 PM


All times are GMT -5. The time now is 10:26 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.