Insert the value in the TEXT box where the cursor was
Hi all
I would like to insert in a text box. at the cursor position (or replace selected text), a text.
I am using the following script, but I can't get it to work.
(see .. http://StackOverflow.com/questions/5889127/insert-value-into-textarea-where-cursor-was )
Thanks in advance
Concerning
Saverio
=======================================
My texarea point is P200_AFORMULA
========================================
function insertAt (myField, myValue, startSel, endSel) {}
If (startSel | startSel == "0") {}
var startPos = startSel;
var endPos = endSel;
myField.val (myField.val (.substring(0, startpos)) + myValue + myField.val () .substring (endPos, myField.val () .length));
}
else {}
myField.val () += myValue;
}
}
the function call
targetBox var = $("textarea #P200_AFORMULA"), startSel, endSel;
targetBox.bind ('focusout/focusouthandler()', function() {}
insertAtCursor (this, "how do you do");
startSel = this.selectionStart;
endSel = this.selectionEnd;
});
var mytext = 'PARALLEL TEXT';
insertAt (targetBox mytext, startSel, endSel);
}
Jorge,
I discovered that the problem is due to the command targetBox.bind ('focusout/focusouthandler()', function() {... })
I tried the following solution work now and it's
Tanks for your answer
Saverio cordially
=================================================================
function insertAtCursor (myField, myValue) {}
IE support
If (document.selection) {}
myField.focus ();
Salt = document.selection.createRange ();
salt. Text = myValue;
}
Support MOZILLA/NETSCAPE
Else if (myField.selectionStart | myField.selectionStart == "0") {}
startPos = myField.selectionStart var;
var myField.selectionEnd = endPos;
myField.value = myField.value.substring (0, startPos)
+ myValue
+ myField.value.substring (endPos, myField.value.length);
} else {}
myField.value += myValue;
}
}
the function call
insertAtCursor (document.getElementById ('P200_AFORMULA'), "TEXT ENTERED");
}
Tags: Database
Similar Questions
-
How to use the selection tool to resize a text box? Before I was able to click on the text box with the selection too in order to resize, but now I click on it and it only gives me 'path' or 'anchor' options.
Ashley,
What about window > show the rectangle enclosing (Ctrl / Cmd + Shift + B to toggle)?
-
Clear values of a text box?
Hello
A fairly simple, I think. When I go back to a page I've been already, a value that I put in the text box is still there. How can I force it's clear each time?
Thank you very much
-AdamHow you navigate away from the page that has the text box? You have a button "Cancel"? Or you click on a link? Whatever it is, you can clear the cache if you don't want to see the old value in your text box. If it is a button, you can clear the cache by specifying the page number or just the name of the element. You can also clear the cache by indicating the page number or items in your point exit link URL.
Jerry
-
After cropping of a photo with Photoshop I discovered that I was unable to rename. I soon found out that the same thing is true when I tried to rename main folders in My Documents. I am able to insert the cursor, but it does not respond when I type characters, or even when I hit him back out. Know a simple fix?
Name change is a directory operation. It would seem that you have read and write access to your directories, but you do not change access. This highlights a problem with file permissions. How is 'Simple' the fix depends on which version of Windows you have to a certain extent.
Windows XP Pro (with "Simple file sharing" turned off) using the security"" tab. When you right-click on a file or a folder and select 'Properties', then click on the 'Security' tab to view and change the permissions.
"How to disable the file sharing simple and how to set permissions on a shared folder in Windows XP"
<>http://support.Microsoft.com/kb/307874 >Windows XP Home Edition is a bit more complicated. You can start safe mode and log in as administrator for the 'Security' tab as above, or you can open a command prompt window (start-> Run-> "cmd") and allows you to display the 'cacls' command or change the permissions of files and folders. You should check that your username has permission to ull 'F' for your records. Not pretty, but it works.
CACLS: <> http://technet.microsoft.com/en-us/library/bb490872.aspx >
HTH,
JW -
How to refer to the gross value of a text box is entered on a new line
Hello
I have a form in livecycle with a radio and the text box buttons.
There is another section of the form that displays the value of the text box when the user clicks on the radio button.
Formcalc script works fine for the first line.
If (xfa.form.form1 [0].) AgendaMatrixFrame [0]. AgendaMatrixRow [0]. AgendaRadios [0]. ActionRadio [0] == 1) then
XFA. Form.Form1.AgendaMatrixFrame.AgendaMatrixRow.AgendaItem.RawValue
on the other
""
endif
It's another when you press on the button will add a new line to the shape. This javascript works fine.
Form1.CommonScripts.AddRow ();
I have not been successful in recovering the value of the text box if a new line is added.
I've changed the reference in the AgendaMaxtrixRow script [0] to AgendaMatrixRow [1], but there was a mistake.
Can someone please provide assistance with how to reference correctly to the new line when adding?
Thank you
Hello
The syntax is a bit light:
This...
this.rawValue = oLastRow.AgendaItem.rawValue; newLine
.. must read...
-
Disappeared from the text box in a submenu (was: problem Adobe Muse)
Hello world
The text box in a sub menu I created disappeared and don't know how I can return it as its created automatically for the structure of the site.
Any ideas?
Thank you
Ian
Thanks for sharing the file. Seems that the submenu got corrupted somehow.
To force the Muse recreate it, please go to the Menu options and change the type of Menu: 'All the Pages' to 'higher level Pages.
Once the submenus will turn off switch back to "All Pages". This time, you will be able to see the missing submenu.
In this sub menu process will lose the formatting that you would need to do it again.
Kind regards
Vivek
-
How can I compare data from a set of values in a text box?
I want to paste a series of numbers in a text box and use it to query the active column of numbers in a report to return only the assets including the active number is in the text box to know how to do this?If your text box contains the values concatenated to a string (: or; or, or another) you can use it in a query by replacing ":" with your string concatenation, similar to this example:
SELECT empno, ename, job, mgr, sal FROM emp WHERE INSTR (':' || :p138_empno_textbox || ':', ':' || empno || ':') > 0
Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Opal-consulting.de/training
http://Apex.Oracle.com/pls/OTN/f?p=31517:1
------------------------------------------------------------------- -
Adding values to insert the query [was: Please help with this code]
I created a comments section where there is that a single comment here field is the code for the form:
< form id = "frmComment" name = "frmComment" method = "POST" action = "<?" PHP echo $editFormAction;? > ">"
< h3 >
< label for = "namegd" > < / label > comment: < / h3 >
< p >
< label for = 'comment2' > < / label >
< textarea = "comment" id = "comment2' passes name ="60"lines ="10"> < / textarea >
< /p >
< p >
< label for = "submit" >
< / label >
< input type = "submit" name = "submit" id = "submit" value = "Submit" / >
< label for = "reset" > < / label >
< input type = "reset" name = "reset" id = "reset" value = "Clear" / >
< /p >
< input type = "hidden" name = "MM_insert" value = "frmComment" / >
< / make >
and inclusion in the code applied to the shape is as follows
$editFormAction = $_SERVER ['PHP_SELF'];
If (isset {}
$editFormAction. = « ? ». htmlentities($_SERVER['QUERY_STRING']);
}
If ((isset($_POST["MM_insert"])) & & ($_POST ["MM_insert"] == "frmComment")) {}
$insertSQL = sprintf ("INSERT INTO comments ('comment',) VALUES (%s)", ")
GetSQLValueString ($_POST ['comment'], "text"));
@mysql_select_db ($database_my_connection, $my_connection);
$Result1 = mysql_query ($insertSQL, $my_connection) or die (mysql_error ());
}
But I want the form to insert more than two values to the database one commented_by and the other will be post_id where = commented_by ($_SESSION ['Username']) and post_id = $row_Recordset1 ['id'] can someone please let me know what will be the modified code and there is commented_by is a text field and post_id is an int field.Please guys help me thanks in advanceIt is easy to add additional values to the Insert query:
$insertSQL = sprintf("INSERT INTO comments (`comment`, commented_by, post_id) VALUES (%s, %s, %s)", GetSQLValueString($_POST['comment'], "text"), GetSQLValueString($_SESSION['Username'], "text"), GetSQLValueString($row_recordset1['id'], "int"));
You must ensure that code to recordset1 comes before the insertion query. By default, Dreamweaver recordset place code immediately above the declaration DOCTYPE and under other server behavior. Thus, you must move the code. Otherwise, this insert query does not work.
-
How to make the sum of the two values in the text boxes?
Hi people,
Am a beginner in oracle 9i with forms 6i forms.using. I want to add two values in two text boxes and the result should be displayed in the third text box.
How to write code in when the button is pressed the trigger of a push button? pls suggest me.
Concerning
VIDSI have not problem
Better you recreate the new formBlock3
1 button
2. item1
3 item2
4 point 3.every article must be in a canvas
what button to trigger
writing and code test it again.give point 1 only
give point 2 only
Now press the button
output should on the 3rd point.Check and return back.
Iqbal
-
Update records with the text box
APEX: 4.0.2
THEME: SAND
SERVER: Oracle-Application-Server-10g/10.1.3.1.0 Oracle-HTTP-Server
I'm just letting my user paste values in a text box, click a button and then update some fields for this record.
I created an example with more comments on the page:
workspace: stevendooley34
username: dev01
password: dev01
application: examples of Forum
page: update example
Keep in mind: the apex, theme, and Server version are different where I created the example. The above version, theme and the server are the stats of my workplace.
Thank you
Steven
-changes
Or if the modification of the code below would be easier I can go that route.
Update oef_itv_ndn
Set cancelled_cd =: MMR_CANCELLED_CD.
closed_date =: MMR_CLOSED_DATE.
admin_remarks =: MMR_ADMIN_REMARKS
where abc = '12345';
I created a dynamic Action with the above code works correctly.
but instead of "abc = '12345' 'I need it to be" where abc in: SEARCH_INPUT "
: SEARCH_INPUT is the text box that users can paste values in this format:
12345
67890
98765
so, when it comes to the clause "where" I need to maintain all records that are in the text box.
Post edited by: StevenD609
The "WHERE" clause is in the wrong position.
It should be part of the "USING" clause)
(the nickname table 'data' is defined in the scope of this subquery)
In addition, it seems to me good.
If you're still having problems, you can go to the forum 'SQL and PL/SQL '.
MK
-
Text box according to the select list option?
Hello people,
I am trying to reach to display a text box where the user can enter details, but that the text box should be activated on when the particular option select the user in the LIST, I created same with the option button when I'm unable to achieve with the SELECT LIST, is - can anyone help with any list of good example?
For the option I have Javascript like: -.
--------------------------------------------------
< /script >
< style type = "text/css" >
#gOSpan {display: none}
#P18_RESULT_TYPE_RADIO {height: 60px banner ;}}
< / style >
< script src = "http://www.google.com/jsapi" > < / script >
< script >
Google.Load ("jquery", "1.2.6");
< /script >
< script type = "text/javascript" >
<! [CDATA]
htmldb_delete_message = "'DELETE_CONFIRM_MSG" ";
gOHTML = ' < span id = "gOSpan" > < input id = "gOTxt" type = "text" value = "" maxlength = "10" / > < / span > '; "
$(document) .ready (function () {}
toggleResultType();
$('_input[id^="P18_RESULT_TYPE_RADIO_"]').click (function () {}
toggleResultType();
});
});
function toggleResultType()
{
var ResultTypeHidden = $('#P18_RESULT_TYPE').val ();
var ResultTypeRadio = $('_entree_:_checked[id^="p18_result_type_radio_"]').val)
var ResultType = ResultTypeRadio? ResultTypeRadio: ResultTypeHidden;
If (ResultType & & ResultType! = 'MPGN II/DAD' & & ResultType! = ' MPGN I' & & ResultType! = 'MPGN III')
{
var $gOSpan = $('#gOSpan');
If ($gOSpan.length == 0)
{
$('#P18_RESULT_TYPE_RADIO_3') .parent ('td') .append (gOHTML);
$gOSpan = $('#gOSpan');
}
If (ResultTypeHidden! = ")
{
$gOSpan.show ();
}
on the other
{
$gOSpan.fadeIn ();
}
$('#P18_RESULT_TYPE_3').attr ('checked', 'checked');
If (ResultTypeHidden & & ResultTypeHidden! = 'MPGN II/DAD' & & ResultTypeHidden! = ' MPGN I' & & ResultTypeHidden! = 'MPGN III')
{
$('#gOTxt').val (ResultTypeHidden);
}
$('#gOTxt').change (function)
{
$('#P18_RESULT_TYPE').val (this.value);
});
}
on the other
{
$('#gOSpan').fadeOut ();
$('#P18_RESULT_TYPE').val ($('input:checked[id^="P18_RESULT_TYPE_RADIO_"]').val ());
If (ResultType is 'MPGN II/DAD')
{
$('#P18_RESULT_TYPE_RADIO_0').attr ('checked', 'checked');
}
ElseIf (ResultType == ' MPGN I ')
{
$('#P18_RESULT_TYPE_RADIO_1').attr ('checked', 'checked');
}
on the other
{
$('#P18_RESULT_TYPE_RADIO_2').attr ('checked', 'checked');
}
}
}
[]] >
< /script >
----------------------------------------------------
I tried to do but:(les chances selon les directives de la liste de sélection, toute aide sera appréciée!)
Thank you
Kind regards
Kumarchange the text field.
go to the tab of the element.
under * attributes of the HTML Form * field enter the people with REDUCED mobility.
Kind regards
Shijesh -
I have the latest version of Skype and trying to extend the text box where I write. Now, it seems so small. I know that before you could develop the window moving upwards or downwards according to the needs.
Someone knows how to do this? Is it still possible?
-
photo book - move the text box
I'm building my first photo book project - I was able to choose a theme, add images, open 'options', type in the text box, edit the fonts and size and move the text up and down the text box - BUT I couldn't resize the text box or move it to the lowest point in the page.
- BUT I was unable to resize the text box or move it to the lowest point in the page-
Which is not supported. You should choose a layout that is the text box where you want it.
Click on the Options button in the toolbar, and then select a layout that has a text more large field or to another post.
-
Problem with text box on the Page Master application to other pages.
I've done this before with success, but maybe I'm missing something and don't have the time to waste on this one there...
I applied a text box to the master page. I applied the master page to all the other pages, but on each page, the text box will appear like this:
I can not type in the text box or select or something. I have a go back to the Page Master and the text box is a-okay.
What I'm missing or doing wrong this time?
Me once again and I have the solution!
1. place the text boxes where you want on your Master.
2. go in the 'Pages' Panel and highlight all the pages.
3. in the "Pages" options of the sliding panel, choose "replace all Master Page items.
Now, all your pages have a floating text box!
See you soon!
Mikey
-
How to add text to the position of the cursor
Hello
I have two controls-string with the text inside.
I also have a button. Now I want to click with the mouse in stringcontrol_2 at a particular position, then click on the button and then the text of stringcontrol_1 must be inserted in the position where I was with the cursor before string_2.
Is this possible?
Thx for any ideas
Hi OnlyOne,
You can use the keydown event of the control channel. Inside this event, you can read the property "Text.selection". If you do not select a range of text, and then start and finish are equal, but they show where the cursor was placed. You can store these values in a shift register to use in the case of "change value" button.
Mike
Maybe you are looking for
-
WiFi disconnects after waking from sleep
Hey guys,. I hope someone can help me with this... I have a 2015 mid pro 15' mbp and about 3 months ago, it began to show this problem, whenever I close a lid for like a hour or more, or standby manually, and when I come back and it up once again, he
-
HP Probook s + peripheral 4540 battery drains unknown
Hi all I just purchashed a new probook 4540 s core i5 with win7 x 64 system. Firstely, when the battery fully charged and then turned off the laptop for a few hours or the next day it becomes 99% or 98% although its plugged in current alternative. St
-
I have administrator privileges, but when I run CHKDSK it says access denied due to insufficient privileges. You have to invoke this utility in elevated mode. How can I fix it?
-
Use of the PIX of the to encrypt a WAN link
We are looking to purchase a service of dark fiber between 2 data centers. We want to encrypt all traffic flowing between the sites, but many dedicated devices stop to 45 MB. We use PIX at each end, just to drive the connection like a virtual private
-
Through the WAN backup controller?
I have this design to implement. 2 sites. on the Wan, there are 3 layer communication. Site 1 access points, I want to have the Site1 controller PDC, but also I would like the exact same APs have backup controller the controller of site 2. I'm assum