Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Colombo
Red Hat Certified System Administrator (RHCSA) - RHEL 10
Sanjeewani95
Updated:
Yesterday at 7:43 PM
NURSING , CAREGIVER , HOTEL & BEAUTY COURSES
IVA Para Medical Campus
Updated:
Thursday at 9:24 AM
Handmade Character Soft Toys Peppa Pig Family
anil1961
Updated:
Wednesday at 9:58 PM
Ad icon
Video Content Creator
pramukag
Updated:
Sunday at 6:10 AM
Ad icon
QA Engineer Intern
pramukag
Updated:
Sunday at 6:07 AM
Electronics
Vehicles
Property
Search
Reply to thread
Forums
Computers & Internet
Tips & Tricks
Tips & Tricks Collection of DC
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="||~DxxCxxxx~||" data-source="post: 3691563" data-attributes="member: 137393"><p><strong>"Grab" Form Field Text 2</strong></p><p></p><p><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><strong>Description:</strong></span></span></p><p><span style="font-family: 'Tahoma'"><span style="font-size: 10px"> Use these instructions to create a 'grab text' option adjacent to your textarea within your forms. You can use any of the 3 options, link, button, or image. See the example in the form below.</span></span> </p><p></p><p><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><strong>Directions:</strong> </span></span></p><p><span style="font-family: 'Tahoma'"><span style="font-size: 10px"> </span></span></p><p><span style="font-family: 'Tahoma'"><span style="font-size: 10px">Use these instructions to create a 'grab text' option adjacent to your textarea within your forms. You can use any of the 3 options, link, button, or image. See the example in the form below.</span></span> <p style="text-align: left"><strong><span style="font-family: 'Tahoma'"><span style="font-size: 10px"></span></span></strong></p> <p style="text-align: left"><strong><span style="font-family: 'Tahoma'"><span style="font-size: 10px">Step 1:</span></span></strong></p> <p style="text-align: left"><strong><span style="font-family: 'Tahoma'"><span style="font-size: 10px"></span></span></strong></p> <p style="text-align: left"><strong><span style="font-family: 'Tahoma'"><span style="font-size: 10px"></span></span></strong></p><p> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="font-size: 10px">The first thing you need to do is setup some JavaScript in the HEAD of your HTML document that will do the 'grabbing'. The function will take whatever form field is passed and set the focus to it then select the text within it.</span></span></p> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"></span></span></p> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"></span></span></p><p> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><span style="color: #800080"><SCRIPT LANGUAGE='JavaScript'></span></span></span></p> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><span style="color: #800080"> <!--</span></span></span></p> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><span style="color: #800080"> function aceGrabText(fieldName){</span></span></span></p> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><span style="color: #800080"> fieldName.focus();</span></span></span></p> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><span style="color: #800080"> fieldName.select();</span></span></span></p> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><span style="color: #800080"> }</span></span></span></p> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><span style="color: #800080"> --></span></span></span></p> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><span style="color: #800080"> </SCRIPT></span></span></span></p> <p style="text-align: left"></p> <p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><p style="text-align: left"><strong><span style="font-family: 'Tahoma'"><span style="font-size: 10px">Step 2:</span></span></strong></p></p> <p style="text-align: left"> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="font-size: 10px">The second thing you need to do is setup the link that will pass the form field data to the JavaScript. It is important to follow this step carefully. You can see in the example link below the JavaScript call </span></span><span style="font-size: 10px"><span style="font-family: 'Tahoma'"><span style="color: #800080">javascript:aceGrabText(document.form1.field1).</span></span></span><span style="font-family: 'Tahoma'"><span style="font-size: 10px">The important part of this call is the "form1" and the "field1" values. These actually tell the JavaScript what form and field will be "grabbed". The textarea resides in a form, type the form name in place of the "form1" name below. Then the textarea itself has a name, type that in place of the "field1" name.</span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"></span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"></span></span></p></p> <p style="text-align: left"> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><strong>Note</strong>: You can add as many links as you want, as many forms and textarea fields you have. Simply change the form name and field name accordingly. They all share the same JavaScript function.</span></span></p></p> <p style="text-align: left"> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><span style="color: #800080"></span></span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><span style="color: #800080"></span></span></span><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><span style="color: #800080"><a href="javascript:aceGrabText(document.</span></span></span><span style="font-size: 10px"><span style="font-family: 'Tahoma'"><span style="color: #ff0000"><strong>form1</strong></span></span><span style="font-family: 'Tahoma'"><span style="color: #800080">.</span></span><span style="font-family: 'Tahoma'"><span style="color: #ff0000"><strong>field1</strong></span></span></span><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><span style="color: #800080">)">Click to Select</a></span></span></span></p></p> <p style="text-align: left"> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="color: #800080"><strong><span style="font-size: 10px">EXAMPLE FORM:</span></strong><span style="font-size: 10px"></span></span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Tahoma'"><span style="color: #800080"><span style="font-size: 10px"> <form name="</span></span></span><span style="font-size: 10px"><strong><span style="font-family: 'Tahoma'"><span style="color: #ff0000">form1</span></span></strong><span style="font-family: 'Tahoma'"><span style="color: #800080">"></span></span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-size: 10px"><span style="font-family: 'Tahoma'"><span style="color: #800080"> <textarea rows="12" cols="62" name="</span></span><span style="font-family: 'Tahoma'"><span style="color: #ff0000"><strong>field1</strong></span></span></span><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><span style="color: #800080">">Text goes here.</textarea></span></span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"><span style="color: #800080"> </form></span></span></span></p></p> <p style="text-align: left"> <p style="text-align: left"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"></span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Tahoma'"><span style="font-size: 10px"></span></span><span style="font-family: 'Tahoma'"><span style="font-size: 10px">Paste the code between the open and close HEAD tags within your document:</span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><strong><span style="font-family: 'Tahoma'"><span style="font-size: 10px">Step 1 - Action:</span></span></strong></span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px">[code]</p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><SCRIPT LANGUAGE='JavaScript'></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><!--</p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px">function aceGrabText(fieldName){</p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px">fieldName.focus();</p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px">fieldName.select();</p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px">}</p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px">--></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"></SCRIPT></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px">[/code] </p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><strong><span style="font-family: 'Tahoma'"><span style="font-size: 10px">Step 2 - Action</span></span></strong></span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Tahoma'"><span style="font-size: 10px">Choose from any of the 3 options, link text, button, or image link. Paste the code between the open and close BODY tags within your document where you want the "grab text" link to appear:</span></span></span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"></p></p> <p style="text-align: left"> </span></span><span style="font-family: 'Verdana'"><span style="font-size: 10px"><p style="text-align: left">Then use Control-C to copy the text into your web page. <span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Tahoma'"><span style="font-size: 9px"></span></span></span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Tahoma'"><span style="font-size: 9px"></span></span></span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><strong><span style="font-family: 'Tahoma'"><span style="font-size: 10px">Link Text Option</span></span></strong></span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px">[code]</p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><a href="javascript:aceGrabText(document.form1.field1)">Click to Select</a></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px">[/code] </p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><strong><span style="font-family: 'Tahoma'">Button</span><span style="font-family: 'Tahoma'"><span style="font-size: 10px"> Option</span></span></strong></span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px">[code]</p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><input type="submit" value="Grab Text" onClick='aceGrabText(document.form1.field1);'></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px">[/code] </p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><strong><span style="font-family: 'Tahoma'"><span style="font-size: 10px">Image Option</span></span></strong></span></span></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px">[code]</p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"><input type="image" src="image.gif" onClick='aceGrabText(document.form1.field1);'></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px"></p></span></span></p><p style="text-align: left"><span style="font-family: 'Verdana'"><span style="font-size: 10px">[/code]</p></p> <p style="text-align: left"> </span></span></p></blockquote><p></p>
[QUOTE="||~DxxCxxxx~||, post: 3691563, member: 137393"] [b]"Grab" Form Field Text 2[/b] [FONT=Tahoma][SIZE=2][B]Description:[/B] Use these instructions to create a 'grab text' option adjacent to your textarea within your forms. You can use any of the 3 options, link, button, or image. See the example in the form below.[/SIZE][/FONT] [FONT=Tahoma][SIZE=2][B]Directions:[/B] Use these instructions to create a 'grab text' option adjacent to your textarea within your forms. You can use any of the 3 options, link, button, or image. See the example in the form below.[/SIZE][/FONT] [LEFT][B][FONT=Tahoma][SIZE=2] Step 1: [/SIZE][/FONT][/B][/LEFT] [LEFT][FONT=Tahoma][SIZE=2]The first thing you need to do is setup some JavaScript in the HEAD of your HTML document that will do the 'grabbing'. The function will take whatever form field is passed and set the focus to it then select the text within it. [/SIZE][/FONT][/LEFT] [LEFT][FONT=Tahoma][SIZE=2][COLOR=#800080]<SCRIPT LANGUAGE='JavaScript'> <!-- function aceGrabText(fieldName){ fieldName.focus(); fieldName.select(); } --> </SCRIPT>[/COLOR][/SIZE][/FONT] [FONT=Verdana][SIZE=2][LEFT][B][FONT=Tahoma][SIZE=2]Step 2:[/SIZE][/FONT][/B][/LEFT] [LEFT][FONT=Tahoma][SIZE=2]The second thing you need to do is setup the link that will pass the form field data to the JavaScript. It is important to follow this step carefully. You can see in the example link below the JavaScript call [/SIZE][/FONT][SIZE=2][FONT=Tahoma][COLOR=#800080]javascript:aceGrabText(document.form1.field1).[/COLOR][/FONT][/SIZE][FONT=Tahoma][SIZE=2]The important part of this call is the "form1" and the "field1" values. These actually tell the JavaScript what form and field will be "grabbed". The textarea resides in a form, type the form name in place of the "form1" name below. Then the textarea itself has a name, type that in place of the "field1" name.[/SIZE][/FONT] [FONT=Tahoma][SIZE=2] [/SIZE][/FONT][/LEFT] [LEFT][FONT=Tahoma][SIZE=2][B]Note[/B]: You can add as many links as you want, as many forms and textarea fields you have. Simply change the form name and field name accordingly. They all share the same JavaScript function.[/SIZE][/FONT][/LEFT] [LEFT][FONT=Tahoma][SIZE=2][COLOR=#800080] [/COLOR][/SIZE][/FONT][FONT=Tahoma][SIZE=2][COLOR=#800080]<a href="javascript:aceGrabText(document.[/COLOR][/SIZE][/FONT][SIZE=2][FONT=Tahoma][COLOR=#ff0000][B]form1[/B][/COLOR][/FONT][FONT=Tahoma][COLOR=#800080].[/COLOR][/FONT][FONT=Tahoma][COLOR=#ff0000][B]field1[/B][/COLOR][/FONT][/SIZE][FONT=Tahoma][SIZE=2][COLOR=#800080])">Click to Select</a>[/COLOR][/SIZE][/FONT][/LEFT] [LEFT][FONT=Tahoma][COLOR=#800080][B][SIZE=2]EXAMPLE FORM:[/SIZE][/B][SIZE=2] <form name="[/SIZE][/COLOR][/FONT][SIZE=2][B][FONT=Tahoma][COLOR=#ff0000]form1[/COLOR][/FONT][/B][FONT=Tahoma][COLOR=#800080]"> <textarea rows="12" cols="62" name="[/COLOR][/FONT][FONT=Tahoma][COLOR=#ff0000][B]field1[/B][/COLOR][/FONT][/SIZE][FONT=Tahoma][SIZE=2][COLOR=#800080]">Text goes here.</textarea> </form>[/COLOR][/SIZE][/FONT][/LEFT] [LEFT][FONT=Tahoma][SIZE=2] [/SIZE][/FONT][FONT=Tahoma][SIZE=2]Paste the code between the open and close HEAD tags within your document:[/SIZE][/FONT] [FONT=Verdana][SIZE=2][B][FONT=Tahoma][SIZE=2]Step 1 - Action:[/SIZE][/FONT][/B][/SIZE][/FONT] [code] <SCRIPT LANGUAGE='JavaScript'> <!-- function aceGrabText(fieldName){ fieldName.focus(); fieldName.select(); } --> </SCRIPT> [/code] [FONT=Verdana][SIZE=2][B][FONT=Tahoma][SIZE=2]Step 2 - Action[/SIZE][/FONT][/B][/SIZE][/FONT] [FONT=Verdana][SIZE=2][FONT=Tahoma][SIZE=2]Choose from any of the 3 options, link text, button, or image link. Paste the code between the open and close BODY tags within your document where you want the "grab text" link to appear:[/SIZE][/FONT][/SIZE][/FONT] [/LEFT] [/SIZE][/FONT][FONT=Verdana][SIZE=2][LEFT]Then use Control-C to copy the text into your web page. [FONT=Verdana][SIZE=2][FONT=Tahoma][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT] [FONT=Verdana][SIZE=2][B][FONT=Tahoma][SIZE=2]Link Text Option[/SIZE][/FONT][/B][/SIZE][/FONT] [code] <a href="javascript:aceGrabText(document.form1.field1)">Click to Select</a> [/code] [FONT=Verdana][SIZE=2][B][FONT=Tahoma]Button[/FONT][FONT=Tahoma][SIZE=2] Option[/SIZE][/FONT][/B][/SIZE][/FONT] [code] <input type="submit" value="Grab Text" onClick='aceGrabText(document.form1.field1);'> [/code] [FONT=Verdana][SIZE=2][B][FONT=Tahoma][SIZE=2]Image Option[/SIZE][/FONT][/B][/SIZE][/FONT] [code] <input type="image" src="image.gif" onClick='aceGrabText(document.form1.field1);'> [/code][/LEFT] [/SIZE][/FONT][/LEFT] [/QUOTE]
Insert quotes…
Verification
Haya warak paha keeyada? (haya wadi kireema paha)
Post reply
Top
Bottom