How to clear Autocomplete text in Jquery.
Hi All,
I have implemented a Autocomplete text item using jquery.Every thing looks fine, but when we clear the country the corresponding state should be cleared.
Here is the code, can any body hep me out where and how to clear the values.
<script type="text/javascript">
$( function() {
$("#P16_ENG_CTRY").autocomplete({
source : function( request , response) {
data = getCountry(request.term);
response( data );
focus : function(event , ui){
event.preventDefault();
function getCountry(key)
document.getElementById('P16_ENG_CTRY')=='';
var ajaxRequest = new htmldb_Get( null , '&APP_ID.' , 'APPLICATION_PROCESS=GET_COUNTRY' , 0);
ajaxRequest.add( 'G_MX01' , key);
ajaxResult = ajaxRequest.get();
return ((ajaxResult.length>0)? ajaxResult.split( '~' ):null);
$( function() {
$("#P16_ENG_STATE").autocomplete({
source : function( request , response) {
data = getStateJ(request.term);
response( data );
focus : function(event , ui){
event.preventDefault();
function getStateJ(key)
document.getElementById('P16_ENG_STATE')=='';
var ajaxRequest = new htmldb_Get( null , '&APP_ID.' , 'APPLICATION_PROCESS=GET_JSTATE' , 0);
ajaxRequest.add('G_MX01',document.getElementById('P16_ENG_CTRY').value);
ajaxRequest.add( 'G_MX03' , key);
ajaxResult = ajaxRequest.get();
return ((ajaxResult.length>0)? ajaxResult.split( '~' ):null);
$( function() {
$("#P16_ENG_CITY").autocomplete({
source : function( request , response) {
data = getCityJ(request.term);
response( data );
focus : function(event , ui){
event.preventDefault();
});Thanks,
Anoo..
Thanks VC for a quick turn around, i have made changes like this which wroks fine but when i click the event outside then it is clearing the list fo state.
Is it possible to clear when i had tried to remove the country manually the sate should clear at at time insted of click the event.
<script type="text/javascript">
$( function() {
$("#P16_ENG_CTRY").autocomplete({
source : function( request , response) {
data = getCountry(request.term);
response( data );
focus : function(event , ui){
event.preventDefault();
change : function(event,ui) {
if ($('P16_ENG_CTRY').val()==null || $('P16_ENG_CTRY').val()==""){
$("#P16_ENG_STATE").val('');}}
Thanks,
Anoo..
Similar Messages
-
How to clear the text in the Text Editor
Hi all,
I created a Text editor and also i am having language field in the screen.
whenever i change the language auomatically the text has to change when the text exists for that
language.
this is working fine, but when the Text exist , the text editor should be blank.
But it is carrying the Previous editor text itself into it .
How to clear the text in the Editor.
Regards,
MadhaviHello Madhavi
The simple report ZUS_SDN_TEXTEDIT_CONTROL shows how to switch the texteditor contents when changing the language.
*& Report ZUS_SDN_TEXTEDIT_CONTROL
*& Thread: how to clear the text in the Text Editor
*& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1145272"></a>
*& By default the itab GT_OUTTAB contains texts in DE and EN.
*& To switch the language directly enter into the command window:
*& LANGU=DE, LANGU=EN or LANGU=FR
REPORT zus_sdn_textedit_control.
TYPE-POOLS: abap.
TYPES: ty_t_text TYPE TABLE OF as4text
WITH DEFAULT KEY.
TYPES: BEGIN OF ty_s_outtab.
TYPES: language TYPE spras.
TYPES: text TYPE ty_t_text.
TYPES: END OF ty_s_outtab.
TYPES: ty_t_outtab TYPE STANDARD TABLE OF ty_s_outtab
WITH DEFAULT KEY.
DATA: gt_outtab TYPE ty_t_outtab,
gs_outtab TYPE ty_s_outtab.
DATA: gd_language TYPE spras.
DATA: go_docking TYPE REF TO cl_gui_docking_container,
go_textedit TYPE REF TO cl_gui_textedit.
DATA: gd_okcode TYPE ui_func,
gd_repid TYPE syst-repid.
START-OF-SELECTION.
PERFORM fill_texts.
gd_language = syst-langu.
PERFORM init_controls.
* Link the docking container to the target dynpro
gd_repid = syst-repid.
CALL METHOD go_docking->link
EXPORTING
repid = gd_repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc NE 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
PERFORM set_text_editor.
* NOTE: dynpro does not contain any elements
" ok-code => GD_OKCODE
CALL SCREEN '0100'.
* Flow logic of dynpro (does not contain any dynpro elements):
*PROCESS BEFORE OUTPUT.
* MODULE STATUS_0100.
*PROCESS AFTER INPUT.
* MODULE USER_COMMAND_0100.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'. " contains push button "DETAIL"
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
TRANSLATE gd_okcode TO UPPER CASE.
CASE gd_okcode.
WHEN 'BACK' OR
'EXIT' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
WHEN 'LANGU=DE' OR
'LANGU=EN' OR
'LANGU=FR'.
PERFORM get_text_editor.
SPLIT gd_okcode AT '=' INTO gd_okcode gd_language.
PERFORM set_text_editor.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form FILL_TEXTS
* text
* --> p1 text
* <-- p2 text
FORM fill_texts .
* define local data
DATA: ld_string TYPE string.
gs_outtab-language = 'EN'. REFRESH: gs_outtab-text.
ld_string = 'Good morning'.
APPEND ld_string TO gs_outtab-text.
APPEND gs_outtab TO gt_outtab.
gs_outtab-language = 'DE'. REFRESH: gs_outtab-text.
ld_string = 'Guten Morgen'.
APPEND ld_string TO gs_outtab-text.
APPEND gs_outtab TO gt_outtab.
gs_outtab-language = 'FR'. REFRESH: gs_outtab-text.
ld_string = space.
APPEND ld_string TO gs_outtab-text.
APPEND gs_outtab TO gt_outtab.
ENDFORM. " FILL_TEXTS
*& Form INIT_CONTROLS
* text
* --> p1 text
* <-- p2 text
FORM init_controls .
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
* repid =
* dynnr =
* side = dock_at_left
* extension = 50
* style =
* lifetime = lifetime_default
* caption =
* metric = 0
ratio = 90
* no_autodef_progid_dynnr =
* name =
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT go_textedit
EXPORTING
* max_number_chars =
* style = 0
* wordwrap_mode = wordwrap_at_windowborder
* wordwrap_position = -1
* wordwrap_to_linebreak_mode = false
* filedrop_mode = dropfile_event_off
parent = go_docking
* lifetime =
* name =
EXCEPTIONS
error_cntl_create = 1
error_cntl_init = 2
error_cntl_link = 3
error_dp_create = 4
gui_type_not_supported = 5
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " INIT_CONTROLS
*& Form SET_TEXT_EDITOR
* text
* --> p1 text
* <-- p2 text
FORM set_text_editor .
BREAK-POINT.
CLEAR: gs_outtab.
READ TABLE gt_outtab INTO gs_outtab
WITH KEY language = gd_language.
CALL METHOD go_textedit->set_text_as_stream
EXPORTING
text = gs_outtab-text
EXCEPTIONS
error_dp = 1
error_dp_create = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " SET_TEXT_EDITOR
*& Form GET_TEXT_EDITOR
* text
* --> p1 text
* <-- p2 text
FORM get_text_editor .
CLEAR: gs_outtab.
CALL METHOD go_textedit->get_text_as_stream
EXPORTING
only_when_modified = cl_gui_textedit=>true
IMPORTING
text = gs_outtab-text
* is_modified =
EXCEPTIONS
error_dp = 1
error_cntl_call_method = 2
OTHERS = 3.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
MODIFY gt_outtab FROM gs_outtab
TRANSPORTING text
WHERE ( language = gd_language ).
ENDFORM. " GET_TEXT_EDITOR
Regards
Uwe -
I want to know how to clear the text area by the push off my next question button and ask a new ques
I want to know how to clear the text area by the push off my next question button and ask a new question - also I want to know how to code in my project to where a user can enter a math question in one border container and the answer enters into the next container
heres my code so far
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" backgroundColor="#1E5C75">
<fx:Script>
<![CDATA[
protected function button1_clickHandler(event:MouseEvent):void
//convert text area into labelid to be identified by actionscript
richTextLabel.text = myArea.text;
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<!--container 1-->
<s:BorderContainer borderWeight="7" x="28" y="10" width="200" height="138">
<s:layout>
<s:VerticalLayout paddingTop="10" paddingBottom="10"
paddingLeft="10" paddingRight="10"/>
</s:layout>
<!--data Entry control-->
<s:TextArea id="myArea" width="153" height="68"/>
<!--end of data entry control-->
<s:Button width="151" label="ask a question" click="button1_clickHandler(event)"/>
</s:BorderContainer>
<!--container2-->
<s:BorderContainer borderWeight="7" x="509" y="10" width="200" height="138">
<s:layout>
<s:VerticalLayout paddingTop="10" paddingBottom="10"
paddingLeft="10" paddingRight="10"/>
</s:layout>
<!--data entry control-->
<!--convert tne data entry control into a label id in actionscript-->
<s:Label id="richTextLabel" width="153" height="68"/>
<s:Button width="151" label="next question" click="button1_clickHandler(event)"/>
</s:BorderContainer>
</s:Application>This is a user to user support forum. We are all iphone users just like you.
You are not addressing Apple here at all.
This is an odd way to ask your fellow iphone users for help. Berating oterh users will not help you.
"it's too fragile"
No it is not. i have never damaged one, nor has anyone I know.
" U loose data when Ur phone is locked"
No you don't. Why do you think this?
"and there is no customer support!!! "
Wrong yet again. Apple has an 800 number and they have many retail stores and they have support articles that you can access using the search bar. Or you can contact them throgh express lane online
"but I will go back with Blackberry "
Please do.
Good ridance -
How to clear a text field when another is selected
Ok I'm new at this, so please forgive me...
I have a form that has the following
a text field that is a dollar amount (eg @1,000)
another text field that has the cents value (eg .00)
and then
a text field that has a % amount (eg 100%)
I only won't the user to fill in one of the options,
either the dollar and cents amount
OR the % amount.
I don't won't them to be able to enter text into both options and once they click on one option I want the other to clear if there is any text entered into that field.
I hope that makes sense, any helpful information would be greatly appreciated!!Sorry..I figured it out. Thanks.
-
How to clear text fields when the user navigates back to the screen
Hi,
Does anyone have any idea on how to clear the text input fields and dropdown boxes when the user navigates back to the screen, say for e.g. create screen?
My issue is that i have plenty of fields in the create screen within a form. Is there a way to avoid programaticaly blanking out every field and just do it at the form level using an api to reset to a state before the user entry?
ThanksThis code allows you to make it more generic, and you would need to tweak it if there are more than TextInput controls, but it should provide some ideas.
As far as using states, you could use SetProperty to set the text to empty, but that might be messier.
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
import mx.containers.FormItem;
import mx.controls.TextInput;
import mx.events.IndexChangedEvent;
import mx.core.Container;
private function clearSreen(evt:IndexChangedEvent):void{
var view:Container = tn.selectedChild as Container;
for each(var child:Object in view.getChildren()){
if(child is FormItem){
var subchild:DisplayObject = child.getChildAt(0);
if(subchild is TextInput){
TextInput(subchild).text = "";
]]>
</mx:Script>
<mx:TabNavigator id="tn" resizeToContent="true"
change="clearSreen(event)">
<mx:Form id="frm1" label="View Number One">
<mx:FormItem label="First name:">
<mx:TextInput/>
</mx:FormItem>
<mx:FormItem label="Last name:">
<mx:TextInput/>
</mx:FormItem>
</mx:Form>
<mx:Form id="frm2" label="View Number Two">
<mx:FormItem label="Address1:">
<mx:TextInput/>
</mx:FormItem>
<mx:FormItem label="Address2:">
<mx:TextInput/>
</mx:FormItem>
<mx:FormItem label="City:">
<mx:TextInput/>
</mx:FormItem>
<mx:FormItem label="State:">
<mx:TextInput/>
</mx:FormItem>
<mx:FormItem label="Zip code:">
<mx:TextInput/>
</mx:FormItem>
</mx:Form>
</mx:TabNavigator>
</mx:Application>
If this post answers your question or helps, please mark it as such. Thanks!
http://www.stardustsystems.com
Adobe Flex Development and Support Services -
How do i clear a text file.....
Hi All...
I wud like to know how to clear a text file....
Currently am replacing the text file and writing...Actually i need to open the file(after clearing the contents)and write.
I think replacing the file each time is not a good idea...
So please let me know how to clear the text file.
Thanks in advance.
Solved!
Go to Solution.You can set the file size to zero using "Set File Size" from the advanced file io palette.
LabVIEW Champion . Do more with less code and in less time . -
How do I get Text Effects to Display Clearly In Illustrator?
How do I get text effects to display clearly in Illustrator?
This is how it started:
This is what happened after I turned on the glow:
This was what the glow setting produced:
This is what the shadow setting produced: -
How to clear the previous filter text when creating new record??
Dear All,
my question is i i created table having filter and sorting.
when i m searching data through filter text data is coming but i want to clear that text(filter text) when i am creating new record.
for my case when i am creating new record all blank field is coming but in that filter text box previous data is coming which one i was searching.
but i need when i will create a new record tat filter text should be clear.
Thanks
DambyDamby, please tell us your jdev version.
Check my blog http://tompeez.wordpress.com/2011/10/29/jdev-how-to-reset-a-filter-on-an-aftable/ you can add this to the button you use to create the new record.
Timo -
Can someone please tell me how to retrieve deleted text. i was clearing old texts when a new one came through at the same time and was deleted also. My last update was iOS 8.1.2
You restore from a backup that was created after the text was received but before it was deleted.
But if you literally deleted it right after it came in, then it's not recoverable. Have the other person resend the text. -
How to get clear small text on black background?
hi,
I'm trying to get some clear small text on black, in the letterboxed area below some video. I've been trying 14pt, with a bit of tracking, using Arial, Helvetica, Skia, and Lucida Grande. They all look clear enough when rendered out to QT, but on my production monitor they dont look good. When I compress it for DVD (using very high bit rate settings) they really fall apart.
I even tried making the text in After Effects, which is what I do with my subtitles, but those are larger (about 24points) and for some reason the small text generated in After Effects looked worse than the native FCP text.
Does anyone have suggestions for the best combination of font and point size to give me clear small text for a black background? I dont mind going up a few point sizes.
Any suggestions would be highly appreciated. Thank you....Hi all,
Many thanks for all the suggestions.
I wound up using Helvetica 18pt, white set at 85%, and applied stib's de-interlacer (http://www.pureandapplied.com.au/plugins.html).
I tried Guassian Blur set to 0.1 but that made it less clear and didn't really help with the flicker. I also made sure to set the position to an even numbered line (I'm using uncompressed)
When I tried Helevetic 17pt, the "a" and the "e" both fell apart towards the top of the letter making them hard to read. I would guess that "g", "i", and "j" would also have problems had I used them.
I didnt have enough time to test, but I wonder if there isnt some font that is better suited for this kind of work than Helvetica. Futura is nice and clean, but a bit thin. Helvetica Neue is also good, but not much differnet than Helvetica. Verdana and Lucida Grande might also be good choice. What do you all use?
thanks again... -
How to enable Clear Type Text Tuner in Windows 7 using GPO?
Hi,
I like to enable Clear Type Text Tuner feature in Windows 7 by default on AD users using GPO settings. Is there any settings in GPO (Windows Server 2008 R2 SP1) to achieve it?
Regards,
Zain KhanHi,
Whether the below policy help:
User Configuration – Administrative Templates – Windows Components – Internet Explorer – Internet Control Panel –
Advanced Page – Turn off ClearType.
Regards,
Yan Li
Cataleya Li
TechNet Community Support -
How do I get text to flow from one page to the next in Pages 5?
How do I get text to flow from one page to the next in Pages 5 with the Maverick system?
What may be overlooked in Pages v5 is the notion of combining Text Boxes via the Menu > View > Show Arrange Tools. When you select two Text Boxes, an extra panel unfolds at the bottom of the Arrange Tools window. Uncheck one Text Box and this panel abruptly disappears.
One can achieve text flow effects between Text Boxes differently based on how one positions the Text Box overlap, and choice of effect above. Though not the accustomed flow found in Pages ’09 v4.3, flow does occur. Consider the possibilities of combining a Shape and a Text box to cut an irregular Text box.
If I create two Text Boxes and position them side by side with outline touching and choose Unite, this creates one larger Text Box and text flows across and down. On the otherhand, if I overlap the upper left corner of a lower Text Box over one above and to the left, then choose Union, pasted text fills the first Text Box and then flows across and down into the other box. Here is a Union example:
Intersect will leave a small Text Box where the two overlap, so not much value there. Subtract will cut a chunk out of one Text Box that is the size of the overlapping piece of the second Text Box:
And Intersect will leave an island in the center where the two Text Box overlap, with flow jumping over this bridge.
Clearly, this is not what we were accustomed to in the past, but with imagination, style, and layout tuning, it does offer alternative Text Box creativity and layout. Of course, there is the option of simply returning to the previous Pages version for true Text Box linking that most will want to use. -
How can I save text messages to my Mac and will that reduce "Other" in storage?
I have hundreds (or more) of text messages on my iPhone 5 that for personal reasons, I want to save. There are far too many to do screenshots. I want to save them to my MacBook Pro Retina in a readable and printable format. The reason is that I read that text messages can cause the "Other" storage to be higher. My "Other" is over 6 GB on a 16 GB iphone. Therefore I want to save texts, print them, and delete from phone.
First question: Is it true that text messages contribute to the size of "Other"?
Second question: How can I save texts to Mac in readable format so they could be printed?
Third question: How in the world do I delete all these texts from my iPhone efficiently? Is there a way to "mass delete"?
When you are answering this, perhaps it is noteworthy that:
(a) I've had an iPhone since a 3G in 2009, and the texts I want to save have been accumulating since then.
(b) My "Other" has gradually gotten larger over the years.
(c) I sync with itunes regularly.
(d) I've never had any problems with an iphone or with my data.
(e) I've restored from backup only three times, when I upgraded to the iphone 4, 4S, and 5.
I want to get this "Other" cleared up before I upgrade to the iphone 5S.
Thank you.You can select to export a folder to save as a .mbox file. This file would need to be imported if you wanted to view the messages.
Select mailbox (folder)
Under Mailbox in the Menu bar select Export Mailbox...
You might also want to check out the demo for EagleFiler by the author for SpamSieve. You could view and search the messages archived in EagleFiler.
http://c-command.com/eaglefiler/
Regarding Mail being slow....
Is it only Mail that is slow? How much free space on your drive? Use Disk Utility to find available space. -
How to insert sales text (MM02) into a single record of a Ztable.
Hi,
I'm extracting data from different data base tables and populating a Ztable which has Matnr as primary key and sales text as a field.
I have already used READ_TEXT to display the text and it is displayed in multiple records which in turn leads to duplication of Material numbers.
Now I want to avoid duplication of records (Matnr) as this being a primary record, and display the sales text of a particular material number into one single record.
Can anyone tell me how to insert sales text (MM02) transaction into one single record.
Thanks,
Govindsorry i am not enough clear about your requirement...
as i can understand i am explaining to you.
suppose your itab contains repaeating matnr.
matnr
1
1
2
2
2
3
3
like this.
data : text(200),
matnr like mara-matnr.
loop at itab.
call READ_TEXT fnmodule.
loop at tline.
concatenate text tline-tdline into text.
endloop.
matnr = itab-matnr.
at end of matnr.
itab1-matnr = matnr.
itab1-text = text.
append itab1.
clear text.
endat.
endloop.
NB change the code as per your requirement
regards
shiba dutta -
How to clear tab settings in Designer in 7.0
I imported an existing form and added text fields/drop downs, etc. I used copy/paste throughout. When I went to set tab order there are in some cases 3 or 4 numbers beside a single field and even straight text fields are numbered. I can't figure out how to clear all of these out so that I can properly set the tab order. When I did advanced>accessibility>full check in the form in acrobat it said that "WARNING: Since the PDF file contains Adobe XML form fields, you must use Adobe Designer to repair errors" and "All of the pages in this document have tab order that may be inconsistent with the structure order".
I am brand-new to using this software so as detailed an explanation as possible would be greatly appreciated.
Thanks!Hello Devi,
There are three ways you can load Master Data in BPC
1) Copy and paste.
Download master data in flat file .Copy the master data and paste in members of dimension after that process the dimension.
2) Using SISS Pakage - load Flat File into BPC-Cube
3) Using SQL Command.
Thanks.
With regards,
Anand Kumar
Maybe you are looking for
-
Dear All, I am using a logical component for global configuration. When selecting this LC in a implementation project all the required IMG nodes are showing up. But when using the same logical component for template project a certain node is not show
-
Acrobat won't convert Word documents within the Acrobat program
I am running OS 10.5.2 on my MacBook Pro. I also have Microsoft Office 2004. I just installed Acrobat 8.0 Pro, patched it all up from the downloads on the website and was ready to convert some Word documents that I have to give to my boss. Went throu
-
IPOD probs - save time and hassle and BUY A NEW ONE - 30 GB Video POD rocks
To everyone with the problem of your older model IPOD hanging up, freezing, and not synching songs properly - I had the exact same problems as many of you have described. It seems they are VERY common since the new updater was released. I spent soooo
-
Exchange 2007 migrate to Exchange 2013
Dear MS Support, I did migrate Exchange 2007 to Exchange 2013 The install complete, the exchange 2007 and 2013 can work together successful DAG has created and work fine Below is capture on exchange group after migrate The exchange 2007 work fine wit
-
I want create an extension for fennec (mobile firefox) in android, i have already an android application and i want lunch it from mobile firefox, by tapping a button that i will add to the user interface of mobile firefox web browser, is this this po