CommandButton set to only call javascript, not submit the page

Hello All,
I have a problem with commandButton. I would like to use commandButton just to call JavaScript. When the user clicks the button, a JS function runs. My problem, is that I don't want to submit the form, right then. I leave the action and actionListener attributes out, but the command button still submits the form. Is there a better way to do this?
Thanks,
Grae

IF you don't want a submit button, then why you use it?
I mean if you want a button that calls a javaScript code then use:
<input type="button" value="xxxx" onclick="xxx( )" />However, if you want to use a submit button (commanButton) but you want to contorl the submission based on JavaScript result fucntion then use:
<h:commandButton onClick="return xxx( ) " ......................... />note the keyword return above, and don't forget to return ture (to submit the page) or false( to ban submission).

Similar Messages

  • The web pages are not centered, they are way over to the right and so not only can I not see the page, I can't see the scroll bar or web address.

    It is like the page shrinks up and moves way over to the right hand corner and I can't pull it back. I tried mini and maxi -ing the screen ... nothing works!!!
    I cant' move the page down to see what the directions are for this box so I am typing this and hoping for the best. Sometimes the arrows will scroll down and other times not.

    Hi Mike ...
    If you haven't tried a different DNS, OpenDNS may help.
    Use OpenDNS for better speed, more security, includes anti phishing filters, prevents browser redirects, it's free and Apple suggests it here >  Safari 5.0.1 or later: Slow or partial webpage loading, or webpage cannot be found
    Open System Preferences / Preferences then select the Network tab. Click the Advanced tab then click the DNS tab.
    Click +
    Enter these addresses exactly as you see them here.
    208.67.222.222
    Click +
    208.67.220.220
    Then click OK.
    Quit then relaunch Safari to test.
    Mike, empty the Safari cache more often. From your Safari menu bar click Safari > Empty Cache

  • Why the iphone4 during a call does not keep the 3G?

    why the iphone4 during a call does not keep the 3G?
    I meet a lot of 3G signal when a call signal disappears 3G! I read the manuals and anything I find the problem! I do so with other brands and other cell does not, the same goes when I receive a call!

    Oniplay wrote:
    I tried to restart, the problem still remains.
    Make sure you do a reset, not a restart. Press and hold both buttons, ignore the "slide to turn off" message and let go of the buttons after the Apple logo shows up on the screen.
    If you did that and it did not bring any change, try to set it up as new device, as explained in this article:
    How to back up your data and set up as a new device
    If it does not work the first time, try not to use the backup afterwards in a second attempt, in case it contains corrupt data.
    If still no luck, get it serviced:
    Apple - Support - Service Answer Center

  • I have 10.6.8 and have installed two new printers HP 8610 and an Epson 7880 and can not find the Page Set-up menu anywhere in the applications I a trying to print from. There are no page sizes, paper types, appearsto be locked on a 13x19 size but It.

    Hi to the Mac Folks,
    I have 10.6.8 and have installed two new printers HP 8610 and an Epson 7880 and can not find the Page Set-up menu anywhere in the applications I a trying to print from. This is regardless of either printer selected.
    I primarily print photos from Photoshop CS5.  The term Page Set-up has gone missing in the file pull down menu. Can't make any choices  There are no page sizes, paper types, appearsto be locked on a 13x19 size paper format. Either being too large or too small.
    Saw a 2008 locked issue about this however none of the help fit my situation, options discussed are not available to me.
    Preview has no "Page Setup" - or does it?
    Does the constant struggle with computer compatability weirdness issues ever end or is it a enslavement scheme?
    Woody

    Hey,
    if you know the name(s) of the root folder(s) you want to access (eg. by making a note on the Windows side) then you can make them appear by just doing Shift-Command-G in Finder ("Go to Folder…"), and entering the full path to the required folders.  You can then navigate all the contents as normal.
    HTH,
    S.

  • [svn:fx-trunk] 5465: Now that padding set on a TextInput does not affect the inner textView, we need to add a custom TextInput skin for the TextInput a Spark NumericStepper contains .

    Revision: 5465
    Author: [email protected]
    Date: 2009-03-20 11:52:56 -0700 (Fri, 20 Mar 2009)
    Log Message:
    Now that padding set on a TextInput does not affect the inner textView, we need to add a custom TextInput skin for the TextInput a Spark NumericStepper contains. Jim ok'ed the addition of the new FxNumericStepperTextInputSkin.mxml class into the spark.skins and wireframe packaged.
    SDK-18275, SDK-19849
    Reviewer: Glenn
    Checkintests: Pass
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-18275
    http://bugs.adobe.com/jira/browse/SDK-19849
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxNumericStepper.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxNumericStepperSkin.mxml
    flex/sdk/trunk/frameworks/projects/wireframe/src/wireframe/FxNumericStepperSkin.mxml
    Added Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxNumericStepperTextInputSkin .mxml
    flex/sdk/trunk/frameworks/projects/wireframe/src/wireframe/FxNumericStepperTextInputSkin. mxml

    Revision: 5465
    Author: [email protected]
    Date: 2009-03-20 11:52:56 -0700 (Fri, 20 Mar 2009)
    Log Message:
    Now that padding set on a TextInput does not affect the inner textView, we need to add a custom TextInput skin for the TextInput a Spark NumericStepper contains. Jim ok'ed the addition of the new FxNumericStepperTextInputSkin.mxml class into the spark.skins and wireframe packaged.
    SDK-18275, SDK-19849
    Reviewer: Glenn
    Checkintests: Pass
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-18275
    http://bugs.adobe.com/jira/browse/SDK-19849
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxNumericStepper.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxNumericStepperSkin.mxml
    flex/sdk/trunk/frameworks/projects/wireframe/src/wireframe/FxNumericStepperSkin.mxml
    Added Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxNumericStepperTextInputSkin .mxml
    flex/sdk/trunk/frameworks/projects/wireframe/src/wireframe/FxNumericStepperTextInputSkin. mxml

  • Could not submit the request to create database 'Name'.

    Hi,
    I had pay-as-you-go subscription. After getting Bizspark subscription, I took backup of database and website. I disabled pay-as-you-go subscription.
    When I tried to create MS SQL Server database, it is giving me "Could not submit the request to create database 'EutheniaDB'. Failed to create the database server." error.
    When I am trying to create new Website with SQL Server database it is giving me same error. But when I create a new website without SQL Server it is creating successfully.
    Does anyone have face similar problem? Am I forgetting something  to configure?
    Please help!
    Regards,
    Suraj Raut

    Hi,
    It could be an issue with your subscription.
    I would request you to check with
    Billing Support. There is no charge to it.
    Regards,
    Mekh.

  • I have an iphone 4 and downloaded my first movie (hd) onto my PC (windows 7) I have not been able to figure out how to transfer the move to my iphone. The movie is in a new tab called "rented" not under the "movie" tab.

    I have an iphone 4 and downloaded my first movie (hd) onto my PC (windows 7) I have not been able to figure out how to transfer the move to my iphone. The movie is in a new tab called "rented" not under the "movie" tab. All of the support I have read talks about the movie being in the "movies" tab. I cannot use the "move" function or the "transfer" function because they are not available. Is this an issue because I just updated to the newest software?

    In order to download to your phone over the air, you need to be connected to WiFi.
    It's possible the Internet connection through Verizon is not stable enough for the downlaod to begin (it is a very large download).
    You might want to head over to Starbucks with your laptop for the afternoon and see if you can download it over their WiFi.

  • Feel a bit silly! But my mouse only seems to scroll down the page but not up??

    I Feel a bit silly! But my mouse only seems to scroll down the page but not up??

    Rosa R wrote:
    Hi All - my question can be a bit silly ...
    Not silly at all...
    See  >  Change your iTunes Store country
    Here  >  http://support.apple.com/kb/HT1311
    Settings > iTunes & App Stores > Apple ID: > View Apple ID > Country/Region = Change Country / Region

  • Icloud download is incomplete. When I load the control panel it only partially loads. I do not get the page that offers feature

    icloud download is incomplete. When I load the control panel it only partially loads. I do not get the page that offers features. Also when I look in my Windows Programs it shows that the icloud program has loaded 80MB vs 42MB. Can someone pelase help

    Uninstall iCloud and reinstall it (reboot in between)

  • How to end a call when not in the phone app?

    OS: 10.2.1
    I like to multitask when on a call so after taking a call I might be inside another app or in the hub, basically anywhere except the phone app. 
    My trouble is.. how can I quickly end a call when I'm done?  
    Swiping up to exit the app I'm in, then pressing the button on the lower left to enter the phone app, then pressing the hang up button sometimes takes up to 5 seconds dependong on the speed of the phone at the time.  Those five seconds of silence at the end of a call can be a little awkward. 
    Any faster way to just hang up a call when NOT in the Phone app?

    You should see the phone icon on the bottom left with the call counter on it. Simply touch that to bring the phone app backup quickly and then hang up.
    1. Please thank those who help you by clicking the "Like" button at the bottom of the post that helped you.
    2. If your issue has been solved, please resolve it by marking the post "Solution?" which solved it for you!

  • My phone randomly doesn't ring when people call and not sound the text alert. I checked all the settings and them seem to be correct. Anyone know how to fix this?

    My phone randomly doesn't ring when people call and not sound the text alert. I checked all the settings and them seem to be correct. Sometimes it rings, many times it doesn't. I have missed several calls. Same with texts. Anyone know how to fix this?

    Symptoms
    No ringer sound
    Go to Settings > Sounds > Ringtone and select a ringtone. Does the device ring? (YES: Issue resolved) (NO: Go to step 2)
    Go to Settings> General> Reset> Erase All Content and Settings. Warning: This will delete all user data on the device. Verify that you have a backup before proceeding. Go to Settings > Sounds > Ringtone and select a ringtone. Does the device ring? (YES: Issue resolved) (NO: Go to step 3)
    Restore device using latest version of iTunes. Go to Settings > Sounds > Ringtone and select a ringtone. Does the device ring? (YES: Issue resolved) (NO: Contact Apple for service options)

  • How can i submit the page periodically(scheduling)

    Hi ,
    I have created IR report by using sql query like..
    EG : select apex_application.checkbox(1,empno),ename,sal from emp;
    And i created SUBMIT button and in the process calling the procedure by using empno as a parameter.
    Here my requirement is that
    i open the page daily and checked some checkboxes and click on the submit button, procedure calling successfully..
    so, i want to submit the page for every one hour without opening the page by using scheduling in apex
    eg scheduling the concurrent program for every one hour..i want to run apex page for every one hour
    Is there any possibilities to schedule a apex page for every one hour..
    please anybody guide me to solve the problem
    Help would be greatly appreciate.
    Regards
    Narender B

    Hi,
    Thinking that you could submit page if it is not open is totally wrong.
    You need look to create background job to your database that run code similar you have on page process.
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_sched.htm#CIHHBGGI
    Maybe you convert your page process to database procedure so you can run it easily using e.g. DBMS_SCHEDULER or process from Apex page.
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • View any report by presing button not when the page rendered by default

    hi all,
    i am new in apex and i need in help to solve the below issue:
    the reports in apex are shown when the page called by default,
    i want that the report will show only when i press any button to show it not when the page requested.
    hope i can get some solutions here.
    regards
    adnan

    Position the button ("Go", for example) in a region that always appear by default.
    Your report should be in a different region, but conditionally renders only when button Go is pressed (aka, request triggered by the button is activated)... or only when some parameter is not blank, whatever the condition you want to create.
    Edited by: Kleber M on Oct 7, 2011 7:33 AM

  • (cannot open page) Safari could not open the page because the server.

    I keep getting this message on both my desktop and ipad "(cannot open page) Safari could not open the page because the server stopped responding" on only certain webstites.
    Hotmail, my college website, my bank.
    However apple and facebook both work.
    help :P

    Hi,
    I have been having "dns server failure" messages for at least two weeks, now. Working with both Apple tech support and my isp ( Wild Blue satellite) to resolve the issue on both my core2duo iMac and i7 MBP both running OS 10.6.8.  No solution until the isp tech came out and went through diagnostics on my machines/  his assesment is that the latest update to Safari has connection bugs to certain isps and that they will eventually be resolved by Safari.
    I called Apple Tech support to tell them this, hoping they would get on the Safari buggy case and fix it sooner. Otherwise I have been using Firefox with no problem.
    Hope this helps.

  • Ajax is caching the output and not updating the page.If you force a second postback after you should have seen a popup (but didn'), you then see popup displayed

    Ajax is caching the output and not updating the page.If you force a second postback after you should have seen a popup (but didn'), you then see popup displayed

    Hey, thanks for replying. It is the user who needs to manually submit the page.
    Basically our page has a hidden div with various text fields and combo boxes. When the user click on specific links on the page, this div is populated and made visible to the user in server side code.
    What happens for all other browsers other than firefox 23 onwards (worked fine in 22) is that after the user clicks on the link, our server side code is executed via a HTTP post. The server then renders the hidden div and sends the additional HTML down to the browser via ASP.NET AJAX.
    With Firefox 23, the additional HTML is not rendered on the first postback. Subsequent clicks of the same link execute the same server side code but the additional HTML is rendered on the browser without issue.
    We've done a lot of debugging now and the issue is localised to a specific third party supplier's (Infragistics) control. I think Firefox 23 must have changed the way that the viewport or screen bounds are calculated or reflected back to this control as the issue seems to stop when we remove the control's MaintainPositionOnScroll attribute. It might be that the Firefox 23 DOM is not able to provide the screen dimensions accurately when the page is first rendered. I say this as the second postback renders the additional HTML fine.
    The control in question is quite an old version so I don't think it's your issue to be honest.
    Just so that this might be helpful to other developers using the Infragistics Window Dialog Control, setting MaintainPositionOnScroll to false solved this issue for us.

Maybe you are looking for