Question about submitting a button upon pressing "Enter"
HI everyone, I am using 11.1.2.1.0.
I have a Panel Form Layout with 2 buttons (let's say, bt1 and bt2). I would want to auto trigger bt2 when user press "Enter".
Is using javascript the only to implement this ? If it is, how(where) shall I place the javascript code if I want to achieve proper placement of codes.
Thank you.
i have a idea , without using javascript
let i consider you had jspx page in that you had af:command button/command toolbar button
choose that button go to the propeties pallete in that, you can found access key property give value say as E
run your page in mozila ffx > 3.0 press alt + ctrl + e it will trigger what you what?
based on browser key will differ.
but somtimes my idea will not match/suit with your requirement so
i have another answer drag and drop the af:resource from the component pallete under jspx root
<af:resource scripttype = "javascript">
//here js code
<af:resource>
<af:commandbutton>
use some listener to invoke your javascript say as clientlistener / serverlistners
<af:commandbutton>
Similar Messages
-
How to set default button when press "Enter"
Hi,
I have a form and it has only one button (Submit). When I press "Enter", it can submit the form and do the action. However, when I add another button (Normal button, not submit), it cannot perform submit action directly when I press "Enter".
If we press "Enter" and the form can submit automatically, it is more user-friendly than without this feature. Therefore, may I know the method of set the default button when users press "Enter"?At first I thought the order of the form controls might matter. When I run this code:
<cfdump var="#GetTickCount()#">
<form action="TestCfgrid.cfm" method="post">
<input name="x" type="text" />
<input type="button" value="x" />
<input type="submit" />
</form>
While I am in the text box, if I press the enter key the form submits. I originally tried it with the submit and button inputs in the opposite order.
Note that the enter button will not submit the form if you are in a select control (aka dropdown) or a textarea or if your focus is not on a form element. That's the default behaviour. If you want to override that, you'll have to write some javascript. -
It doesn't matter what web-page I'm on, the top 40mm or so of the screen is a dead area for clicking on buttons or links. e.g. in Google I can click on a link lower down the page and get transferred to the new article - but if I were to move the item up nearer the top of the page the link would no longer operate.
I can move to a link by repeated operation of the "Tab" key until the link or button is indicated, and then press "Enter" to use the link, but this is potentially very time-consuming if there are a lot of links on the page.
I'm using a Toshiba Satellite L750 loaded with Windows 7, and Firefox 16.0.Problems with buttons and links at the top of the page not working can be caused by an extension like the Yahoo! Toolbar or a Babylon extension that extents too much downwards and covers the top part of the browser window and thus makes links and buttons in that part of the screen not clickable.
*https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
*Do not click the Reset button on the Safe mode start window or otherwise make changes.
*https://support.mozilla.org/kb/Safe+Mode -
Execute (F8) taking place upon pressing 'Enter' key
Hi,
I have developed two custom screens in separate programs. The second screen has been assigned a transaction code and is called from the first screen upon user command. Input in screen 1 is in the form of an IO field that takes two-character codes. The appropriate transaction is called depending on the value of the code input by the user.
Before the second program is called (using call transaction statement), inputs are error checked using input checking modules. Pressing the enter key does not cause the second program to be called, which is as it should be. Only upon execution (F8) is the second program called. Once the second program has been called and exited (using leave program statement) it goes back to the first program (screen). This is alright. The issue is that now when the enter key is pressed, the transaction for the second program is called again. I don't want this to happen. This should happen only upon execute, not from pressing Enter. If I input a different value in the input field at this point then press enter it doesn't execute, which is ok. The issue I have described occurs only in the case of calling a transaction, exiting the second screen which is called (which takes you back to the first screen) and pressing Enter.
My code:
TABLES: ZSH_PROCS.
Global data declarations.
DATA: OK_CODE LIKE SY-UCOMM,
PROC_INFO LIKE ZSH_PROCS,
PROC_INPUT TYPE ZSH_DE_PN.
Screen fields - Used in screen: '9500'.
DATA: TBX_PROCESS TYPE ZSH_DE_PN,
LBL_PROC_STXT TYPE ZSH_DE_PD.
Modules
MODULE INIT_9500 OUTPUT.
SET PF-STATUS 'ZSH_GUIS_MAIN'.
SET TITLEBAR 'ZSH_TITL_MAIN'.
ENDMODULE.
MODULE EXIT_9500 INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'BACK' OR 'EXIT' OR 'CANCEL' OR 'BTNEXIT'.
LEAVE PROGRAM.
ENDCASE.
ENDMODULE.
MODULE PROC_CHECK_9500 INPUT.
PROC_INPUT = TBX_PROCESS.
TRANSLATE PROC_INPUT TO UPPER CASE.
SELECT SINGLE * FROM ZSH_PROCS INTO CORRESPONDING FIELDS OF
PROC_INFO WHERE PRNAM EQ
PROC_INPUT.
IF SY-SUBRC NE 0.
CLEAR: TBX_PROCESS,
LBL_PROC_STXT.
MESSAGE E008(ZSH_MSGC).
ELSE.
LBL_PROC_STXT = PROC_INFO-PDESC.
ENDIF.
ENDMODULE.
MODULE USER_COMMAND_9500 INPUT.
OK_CODE = SY-UCOMM.
CASE OK_CODE.
WHEN 'EXECUTE'.
CALL TRANSACTION PROC_INFO-TCODE.
ENDCASE.
Screen flow logic:
PROCESS BEFORE OUTPUT.
MODULE INIT_9500.
PROCESS AFTER INPUT.
MODULE EXIT_9500 AT EXIT-COMMAND.
CHAIN.
FIELD: TBX_PROCESS,
LBL_PROC_STXT.
MODULE PROC_CHECK_9500.
ENDCHAIN.
MODULE USER_COMMAND_9500.
Tha above code is for the first program (screen). Help is greatly appreciated. Thanks.
Regards
Edited by: Khan Awkhan on Jul 22, 2008 6:34 AMHi,
Clearing the ok_code should solve your problem.
Try this:
MODULE INIT_9500 OUTPUT.
SET PF-STATUS 'ZSH_GUIS_MAIN'.
SET TITLEBAR 'ZSH_TITL_MAIN'.
" Clearing the ok code
CLEAR OK_CODE.
ENDMODULE.
Regards,
Wajid Husssain P. -
Upon Pressing Enter Key in an InputField
Hi,
I have an InputField where i have to enter AirlineId and followed by search button
But my requirement here is <b>
We have to press Enter key in INputField.Then all the AirLineIds which are there in the database has to be popuped and in that the one which selects has to be placed in the InputField</b>
Regards
PadmaHi Padma,
Create a onEnter event for the input field & inside that create a modal window. For that window u have to create a view also.
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/dialog%20boxes%20in%20web%20dynpro%20applications.pdf">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/dialog%20boxes%20in%20web%20dynpro%20applications.pdf</a>
In this tutorial check the code for AddressBook(not for external window) .U can use this code
IWDWindowInfo myWinInfo = wdComponentAPI.getComponentInfo().findInWindows("<window name>");
myPopupWindow = wdComponentAPI.getWindowManager().createWindow(myWinInfo,true);
myPopupWindow.setWindowPosition(300,150);
myPopupWindow.open();
regards
Sumit -
Can I execute a Button when pressing "Enter" in an InputField?
Hi All,
I have an InputField and next to the InputField, there is a Button.
Ii would like to have my application executing the Button when the User presses the "Enter/ Return" Button on his keyboard.
Is that possible? If yes, how??
Thanks, JohannesHi,
You can try using OnEnter property of the Input field for your requirement. Assign a method to the onEnter property of the input field and now when the user fills data in the field and press enter the method assigned will be executed.
Thanks,
Abhishek -
Trigg the 'Query' button when pressing 'Enter' on the keyboard
I have a form with 2 buttons, 'query' and 'reset'.
I would like that the 'query' button is triggerd (pressed) when the user presses 'Enter' on the keyboard. In regular html I think this is accomplished if the button is a 'submit' rather than a 'button' type, but I haven`t found a way to edit the
type of button in Portal.
Users belive it`s very annoying to have to move the mouse over the 'query' button to execute the query, and would rather like to just press 'Enter'.
I`ve tried to use a javascript (onKeyPress), but if you make a javascript in Portal, you`re not allowed to add this to your button, only as an 'form-' or 'field validation' in a textbox.
Is there anyone who knows a way to get this functionality?
Regards,
OrjanOne of the AVG add-ons for Firefox has been reported to cause that to happen. Disable that add-on until AVG fixes it.
-
Satellite A660: Remark and a question about illumination/mute button
Remark:
Hi, I am a proud owner of a satellite A660-166 (3 days old) and I installed everything from scratch on the win 7 pro since I received my laptop with a home version (need pro for work)...I encountered some problems but this forum really answered all my questions :) Never found such a helpful forum for technical support. So I wanted to express my gratitude and my support for everything you do for the users :)
Problem: Well, it's not really a problem, more of a curiosity... I had some problems with the eco button at that point illumination/mute button was for mute....Thanks to you guys I found out what needed to be done, I reinstalled Flash card software and everything was working properly plus the illumination/mute button was for illumination now. I don't have anything against that, I prefer it that way, but I'm wondering how do I change that...I found some unanswered thread about using toshiba assistant and the illumination tab...Since my laptop is pretty new, I don't have an illumination tab, I was wondering how do I change the button to mute if I want to?
Thanks, keep up the good work!It is nice to hear you found answers to your questions here. Many people here try to help.
Back to your issue: It is not easy to offer precise answer and I really dont know if you can change settings for one single button. I think it has something to do with registry entries but how to change it is another question.
If you use this button for illumination ON/OFF you can use FN+ESC for MUTE option so you will have both options that can be used using one single button or quick key combination.
Can you please test it and confirm it works properly? -
Questions about submitting PDF form to server
I need to add a submit button to an existing PDF form that will submit it to a PHP script on the server. I can find information on submitting as FDF, but what does the "submit as HTML" option do? What and how does it submit to the server? I added a button (also a minor problem, the button text doesn't show) to the document with Acrobat 9 Pro, choosing the "Submit as HTML" option, but when I submit it to a PHP script on the server that should echo or printr submitted $_POST data, I get an error message "An error occurred in the submit process. Cannot process content of type text/html."
Apparently submitting as FDF is not an option, because the server does not have the FDF toolkit. What I need to be able to do is submit the PDF form with the information entered into it to the server, and redisplay it with the form inputs in place and with an added image. What would be the easiest way to do this? If I can get the form onto the server in HTML format, it would be easy to to add the image and redisplay it, or possible there is some way I could redisplay it in PDF format after adding an image to it? Any advice? Some tutorial on the other PDF form submit actions?Could someone at least point me to some information that provides all the details of how a PDF form is submitted to the server and discusses the options for the action? This information must surely exist somewhere, but after two days of searching I cannot find it.
I am experienced with PHP (I used FPDF for one project) so a specific "how to" that is PHP oriented would be nice. -
Create trigger to execute report upon pressing enter
Hi,
I have a screen where users input a vendor number and then have to click the execute button to view the report. I want to create some sort of trigger so when the user presses the enter button the program will execute instead of having to press the execute button or F8. Does anyone know how to create this event? Thanks for your help!
ShaneHi,
You need to check sy-ucomm at selection screen.If its for "enter" then execute the program.Same as the execute button does.
I am not sure if sy-ucomm gets captured there, It should be blank.Just try once.
Edited by: sap_wiz on May 26, 2011 10:39 AM -
Brand new Dreamweaver user - question about SEND/SUBMIT button
Hello, all. Nice to meet you. I'm brand new to dreamweaver,
but not brand new to Design view in Frontpage - LOL.
I can create the basic website, with teh pictures,
thumbnails, multiple page cross links..etc.
My only question is I'm trying to make an application page -
basically a link from the home page that says APPLICATION.
I am familiar with adding text boxes for FIRST NAME/LAST
NAME/NUMBER/BEST TIME TO CALL...etc.
The only problem is I dont know what to do with that.
I don't think it can automatically send an email without smtp
info in the script, but I wouldnt mind letting it create a txt file
or something on the server so I can view it.
Or maybe it can send me an email, who knows.
Is there a really simple way or code I can use to have teh
send button somehow get to my email for me to view comments, names,
contact information...etc?
Remember, total beginner.
TIA> Remember, total beginner.
The very best thing you can do is to get a good book on HTML
and CSS and
spend some time learning the underlying technology. DW is
very different
from FP, and will expect you to have some of this
understanding under your
belt.
There are only two ways to process form data -
1. Use mailto:[email protected] as the action of the form
2. Use a server-side scripting method to a) harvest the
form's data, b)
process it in some manner, e.g., enter it into a database, c)
formulate and
send an email to one or more email recipients, and d)
redirect the visitor
to some ending page
Method 1 is quite simple, and is also the least reliable. It
depends both
on your visitor having an email client already installed on
their computer -
this eliminates public computers, or home users without email
clients
installed (more and more it seems) - and on the installed
email client
responding to
the mailto call. It is not possible to use this method *and*
send the
visitor to a
thank you page as well.
Method 2a is the preferred method, since it eliminates the
problems of
method
1, but it means that you have to grapple with
server-scripting somehow (ASP,
CF, PHP, perl, etc.).
Method 2b would be to use some third-party form processing,
like
http://www.bebosoft.com/products/formstogo/.
You would have to decide which of these methods is best for
your needs,
but if it's Method 2a, then start by asking your host what
they provide for
form
processing. If it's 2b, then read their FAQ/instructions
carefully.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"JT6681" <[email protected]> wrote in
message
news:[email protected]...
> Hello, all. Nice to meet you. I'm brand new to
dreamweaver, but not brand
> new
> to Design view in Frontpage - LOL.
> I can create the basic website, with teh pictures,
thumbnails, multiple
> page
> cross links..etc.
>
> My only question is I'm trying to make an application
page - basically a
> link
> from the home page that says APPLICATION.
> I am familiar with adding text boxes for FIRST NAME/LAST
NAME/NUMBER/BEST
> TIME
> TO CALL...etc.
>
> The only problem is I dont know what to do with that.
>
> I don't think it can automatically send an email without
smtp info in the
> script, but I wouldnt mind letting it create a txt file
or something on
> the
> server so I can view it.
>
> Or maybe it can send me an email, who knows.
>
> Is there a really simple way or code I can use to have
teh send button
> somehow
> get to my email for me to view comments, names, contact
information...etc?
>
> Remember, total beginner.
>
> TIA
> -
I have a resize problem and a question about the reset button.
What I am trying to do is clear the list, I can clear the name but I want the list to have no selections instead of going back to default. Also I wanted to know if there is anyway to resize the list windows because one of my list windows is off on my maac computer but not on a regular pc.
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
<applet code="ListDemo" width=300 height=400>
</applet>
public class ListDemo extends Applet implements ActionListener {
List os, browser;
String msg = "";
String text;
String named = "";
TextField name;
Button Ok, reset;
public void init() {
Ok = new Button("Ok");
reset = new Button("reset");
add(reset);
add(Ok);
reset.addActionListener(this);
Ok.addActionListener(this);
Label namep = new Label("Name: ", Label.RIGHT);
name = new TextField(12);
add(namep);
add(name);
name.addActionListener(this);
os = new List(4, false);
browser = new List(4, false);
os.add("default");
os.add("BMW");
os.add("BENZ");
os.add("Lexus");
os.add("Acura");
browser.add("default");
browser.add("Red");
browser.add("Black");
browser.add("Silver");
browser.add("Blue");
browser.add("Yellow");
browser.add("Pink");
browser.add("Grey");
browser.add("Blue/Black");
os.select(0);
browser.select(0);
add(os);
add(browser);
os.addActionListener(this);
browser.addActionListener(this);
public void actionPerformed(ActionEvent ae) {
String str = ae.getActionCommand();
if(str.equals("Ok")){
text = "You pressed Ok";
else
if(str.equals("reset")){
browser.select(0);
os.select(0);
text = "";
name.setText("");
repaint();
public void paint(Graphics g) {
g.drawString("Name: " + name.getText(), 6, 120);
int idx[];
msg = "Current Car: ";
idx = os.getSelectedIndexes();
for(int i=0; i<idx.length; i++)
msg += os.getItem(idx) + " ";
g.drawString(msg, 6, 140);
msg = "Current Color: ";
msg += browser.getSelectedItem();
g.drawString(msg, 6, 160);
g.drawString(text, 6, 200);now test it i thing it fullfills all of ur requirments
import java.awt.*;
import java.awt.event.*;
public class listDemo extends Frame
{List li;
public listDemo()
Button btnReset = new Button("Reset");
li = new List(4,false);
this.setLayout(new FlowLayout());
li.add("Danish");
li.add("KHan");
li.add("Muhammad");
li.add("Saqib");
li.add("Ramzi");
li.add("Cute");
add(btnReset);
add(li);
btnReset.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae)
li.resize(300,233);
li.select(0);
li.setFocusable(false);
this.setVisible(true);
this.setSize(200,300);
public static void main(String []args)
new listDemo();
}regrads,
Muhammad Danish Khan -
Newbie with question about mouse wheel button
Sorry in advance if this is too simple, but I'm trying to create an interactive website that requires scene switching by way of the mouse wheel button.
I'm creating mutliple interactive labeled images that I want to be able to scroll through by using the mouse wheel button but I don't know the action script code.
Any help?
Furna.Hi Kglad I have a small query about your code correct me if I am wrong some where. You used following lines to
create movie clip,
set focus on it,
and add event listener to it.
the lines are
var tl:MovieClip = this
stage.focus = tl
tl.addEventListener(MouseEvent.MOUSE_WHEEL,f);
Now say I have a button on stage and I click it once. the focus will change to the button. and hence we will have to set the focus again to tl after processing button click. am I correct on this?
we can alternatively use
stage.addEventListener(MouseEvent.MOUSE_WHEEL,f);
which will always listen to the scroll event no matter where the focus is, or is there some problem which might occur due to this? -
Really innocuous question about the home button.
Was just wondering if the home button having a tiny amout of "play," sort of side to side, is normal.
Thanks for humoring me.Yes it does. When you press the Home button, it usually produces a slight clicking sound.
-
Really simple Mac Mail question about the Delete button
When at a message, the Edit menu shows Command+Delete as being the proper keystroke for deleting a message.
Just pressing Delete also removes it from the Inbox.
What is different between that and Command+Delete?
Thanks,
dougHi,
I don't have a very good answer to you other than the fact that the Macbook does not have a proper DELETE-button. You delete by pressing cmd/backspace.
If you want to delete something through Finder you have to press cmd/backspace. In orher programs, like Mail, you can delete by pressing only backspace. In iPhoto you can delete pictures by presing backspace and conform with return.
The reason for these different solutins are not known to me...
Nils
Maybe you are looking for
-
Java class how to load a JavaFX class?
I want to start a JavaFX application from a Java class,how can implement it? Thank you so much!
-
Is there any thought of this being developed for multi-window capable devices? I prefer firefox over the built in browser
-
XP hangs when I try to play a .mov file
Windows XP consistently hangs when I try to play a .mov file using QuickTime 7.4.1. There is no way to regain control of the system without powering off the computer. I've seen a number of postings indicating that people who have RAID disk systems ar
-
Effect smart sharpen is not working
help please
-
Modifying Test Report with on-the-fly reporting
Hello, I am using teststand3.0 and trying to use on-the-fly reporting. The problem I am getting is report is adding begin sequence and end sequence tags to the report. Is there any way that I can remove these tags. The sample report looks like this B