How to check for a  button

I have a form that submits to itself. My submit is the
standard :
<input type="submit" name="btnsubmit" value="Submit Your
Order">
When the form is submitted, I check for the existence of
btnsubmit using paramerexists or isDefined :
<cfif parameterexsits(btnsubmit)>
perform inserts, etc.
</cfif>
This works fine. But my question is what do I do if the
type=button instead of submit ? For example
<input type="button" name="btnSubmit" value="Submit Your
Order">
I have some javascrpt validation that will submit the form
when the button is clicked. Howver, how do I determine whether the
button was seleceted or not, so that I can do my processing
(insert, etc. ) ? I tried to use the isDefined or parameterexists
like before but that does not work ?
What is the command to check that a button was selected
?

Assuming your <input> button is inside of the form you
are submitting,
simply use
<cfif isDefined('form.btnSubmit')>
However - some browsers only pass the button value if that
particular
button is clicked.
In other words, hitting 'enter' in another field of the form
may not
pass in the submit button value as part of the form scope. In
this case
you'd want to check for another one of the form variables,
ideally a
required field.
trojnfn wrote:
> I have a form that submits to itself. My submit is the
standard :
> <input type="submit" name="btnsubmit" value="Submit
Your Order">
>
> When the form is submitted, I check for the existence of
btnsubmit using
> paramerexists or isDefined :
> <cfif parameterexsits(btnsubmit)>
> perform inserts, etc.
> </cfif>
>
> This works fine. But my question is what do I do if the
type=button instead of
> submit ? For example
> <input type="button" name="btnSubmit" value="Submit
Your Order">
>
> I have some javascrpt validation that will submit the
form when the button is
> clicked. Howver, how do I determine whether the button
was seleceted or not, so
> that I can do my processing (insert, etc. ) ? I tried to
use the isDefined or
> parameterexists like before but that does not work ?
>
> What is the command to check that a button was selected
>
Michael Evangelista, Evangelista Design
Web : www.mredesign.com
Forums: news://forums.mredesign.com
Blog : www.miuaiga.com

Similar Messages

  • How may one cancel the download of an update that was started by having actuated the "Check for Updates" button in the "About Firefox" window, please?

    How may one cancel the download of an update that was started by having actuated the "Check for Updates" button in the "About Firefox" window, please? If possible please cover all platforms, Mac, Windows, Linux, although the first mentioned is what currently applies to my circumstances.
    Thank you.

    Such a download is usually saved in an updates or updated folder in the Firefox program/application folder.
    You can delete this folder to cancel the download.
    If files already have been downloaded then remove the files in the updates and updates\0 folder.
    *http://kb.mozillazine.org/Updates_reported_when_running_newest_version
    *http://kb.mozillazine.org/Software_Update
    Mac: /Applications/Firefox.app/updates "/path_to/Firefox.app/Updated.app"
    Linux: "/path_to/firefox/updated"
    Windows: C:\Users\&lt;user&gt;\AppData\Local\Mozilla\Firefox\Mozilla Firefox\updates

  • Touch Events: How can I check for a button being pressed while another button is being held down?

    Hello,
    I'm trying to check for a button being pressed while another is down through Touch.  In my case, I' m making a game and I need for a button to make the character jump.  However, when I hold down right, I notice that the jump button becomes somewhat unresponsive and I have to press it twice or more to get it to trigger, as opposed to just pressing the jump button by itself with nothing held down which works fine.  I'm testing this on my Motorola Droid 2.
    Here is some of my code that demonstrates text instead of my character moving around:
    package  {
         import flash.events.TouchEvent;
         import flash.ui.Multitouch;
         import flash.ui.MultitouchInputMode;
         public class Document extends MovieClip {
               Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
               private var controls:BottomBar;
               private var debugText:String;
               public function Document() {
                    addIngameGUI();
               private function addIngameGUI(){
                    controls = new BottomBar();
                    controls.y = stage.stageHeight - controls.height;
                    addChild(controls);
                    controls.aBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.bBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.leftArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.rightArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
             private function testBtns(event:TouchEvent){
                   debugText.text = event.target.name;
    What am I doing wrong?  Is there a better approach?
    Thank you in advance.

    Hello,
    I'm trying to check for a button being pressed while another is down through Touch.  In my case, I' m making a game and I need for a button to make the character jump.  However, when I hold down right, I notice that the jump button becomes somewhat unresponsive and I have to press it twice or more to get it to trigger, as opposed to just pressing the jump button by itself with nothing held down which works fine.  I'm testing this on my Motorola Droid 2.
    Here is some of my code that demonstrates text instead of my character moving around:
    package  {
         import flash.events.TouchEvent;
         import flash.ui.Multitouch;
         import flash.ui.MultitouchInputMode;
         public class Document extends MovieClip {
               Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
               private var controls:BottomBar;
               private var debugText:String;
               public function Document() {
                    addIngameGUI();
               private function addIngameGUI(){
                    controls = new BottomBar();
                    controls.y = stage.stageHeight - controls.height;
                    addChild(controls);
                    controls.aBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.bBtn.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.leftArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
                    controls.rightArrow.addEventListener(TouchEvent.TOUCH_BEGIN, testBtns);
             private function testBtns(event:TouchEvent){
                   debugText.text = event.target.name;
    What am I doing wrong?  Is there a better approach?
    Thank you in advance.

  • How to Disable Check for updates button in Help/About in firefox 5.0

    Hi the user should not manually check for updates so we want to disable the Check for updates button also in Help/About.
    Thanks in advanced

    You can hide that button with code in userChrome.css below the @namespace line.
    * http://kb.mozillazine.org/userChrome.css
    * http://kb.mozillazine.org/Editing_configuration
    You can use the ChromEdit Plus or Stylish extension to have easier access to the customization files.
    * ChromEdit Plus: http://webdesigns.ms11.net/chromeditp.html
    <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    #aboutDialog #updateBox { display:none!important; }</nowiki></pre>
    You can also choose to lock the related update pref(s) to false if you want to make sure.
    See:
    * http://kb.mozillazine.org/Locking_preferences
    * http://kb.mozillazine.org/about:config

  • How to check for a function module with its description and functionality

    Hi all,
    How to check for a function module,with its description and its functionality,in detail how can I know the purpose of a particular function module,how to search for a function module which suits my requirement .

    Hi,
    You can search a FM of your requirement by putting in the Key words and searching for a FM. Like * KEYWORD * and then pressing F4.
    Say for example you need to search something regarding converstion.
    Search for * CONVERT * and press F4.
    If there is something specfic like converting date to something you can give
    DATE * CONVERT *
    OR
    CONVERT * DATE *  and press F4.
    Once you narrow down your search you will have a Function module documentation inside the Function module. Please note that all the FMs willl not have documentation.
    Regards,
    Pramod

  • Want to know how to check for new line character in text file

    Hi All,
    I`m trying to read data from text file. However I`m not sure whether the data is in 1st line or nth line. Now I`m trying to read the text from the readline. But if text is "" and not NULL then my code fails. So I want to know how to check for new line character and go to next line to find the data. Please help.
    Thanks
    static int readandwriteFile(Logger logger,String filepath){
              BufferedWriter out = null;
              BufferedReader in = null;
              File fr = null;
              int get_count = 0;
              try     {
              if(new File(filepath).exists())
              fr= new File(filepath);
                        System.out.println("FileName: "+fr);
                   if(fr != null){
    in = new BufferedReader(new FileReader(fr));
                             String text = in.readLine();
                             if(text != null){
                             get_count = Integer.parseInt(text);
                             in.close();
                             else{
                                  get_count = 0;
         else{                    
    out = new BufferedWriter(new FileWriter(filepath));
         out.write("0");
                out.close();
                   }          //Reading of the row count file ended.
              catch(Exception e) {
                   e.printStackTrace();
              finally {
                   try{               if (in != null) {
                             in.close();
              if (out != null) {
                             out.close();
              catch(Exception e) {
                        e.printStackTrace();
              return get_count;
         }

    You are calling the readline() only once which means you are reading only the first line from the file...
    Use a loop (Do-While preferably)
    do{
    //your code
    }while(text == "")

  • How to check for the sub folder in the document library Is already Exist using CSOM?

    Hi,
    My requirement is to create the  folder and sub folder in SharePoint document library. If already exist leave it or create the new folder and the subfolder in the Document library using client side object model
    I able to check for the parent folder.
    But cant able to check the subfolder in the document library.
    How to check for  the sub folder in the document library?
    Here is the code for the folder
    IsFolder alredy Exist.
    private
    string IsFolderExist(string InputFolderName)
    string retStatus = false.ToString();
    try
    ClientContext context =
    new ClientContext(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryLink"]));
                context.Credentials =
    CredentialCache.DefaultCredentials;
    List list = context.Web.Lists.GetByTitle(Convert.ToString(ConfigurationManager.AppSettings["DocumentLibraryName"]));
    FieldCollection fields = list.Fields;
    CamlQuery camlQueryForItem =
    new CamlQuery();
                camlQueryForItem.ViewXml =
    string.Format(@"<View  Scope='RecursiveAll'>
    <Query>
                                            <Where>
    <Eq>
    <FieldRef Name='FileDirRef'/>
    <Value Type='Text'>{0}</Value>
                                                </Eq>
    </Where>
    </Query>
                                </View>",
    @"/sites/test/hcl/"
    + InputFolderName);
                Microsoft.SharePoint.Client.ListItemCollection listItems = list.GetItems(camlQueryForItem);
                context.Load(listItems);
                context.ExecuteQuery();
    if (listItems.Count > 0)
                    retStatus =
    true.ToString();
    else
                    retStatus =
    false.ToString();
    catch (Exception ex)
                retStatus =
    "X02";
    return retStatus;
    thanks
    Sundhar 

    Hi Sundhar,
    According to your description, you might want to check the existence of sub folder in a folder of a library using Client Object Model.
    Please take the code demo below for a try, it will check whether there is sub folder in a given folder:
    public static void createSubFolder(string siteUrl, string libName, string folderServerRelativeUrl)
    ClientContext clientContext = new ClientContext(siteUrl);
    List list = clientContext.Web.Lists.GetByTitle(libName);
    CamlQuery camlQuery = new CamlQuery();
    camlQuery.ViewXml =
    @"<View Scope='RecursiveAll'>
    <Query>
    <Where>
    <Eq>
    <FieldRef Name='FSObjType' />
    <Value Type='Integer'>1</Value>
    </Eq>
    </Where>
    </Query>
    </View>";
    //camlQuery.FolderServerRelativeUrl = "/Lib1/folder1";
    camlQuery.FolderServerRelativeUrl = folderServerRelativeUrl;
    ListItemCollection items = list.GetItems(camlQuery);
    clientContext.Load(items);
    clientContext.ExecuteQuery();
    Console.WriteLine(items.Count);
    if (0 == items.Count)
    //create sub folder here
    Best regards
    Patrick Liang
    TechNet Community Support

  • "Check for Updates" button in iTunes not working

    Hi there,
    Forgive this post if it is a repeat - I searched and didn't see this exact problem though (but perhaps it's a common one at any rate).
    I have a lot of apps on my "Applications" page, and until recently, iTunes did a great job of allowing me to quickly check and then download all of my updates (usually on a daily basis) from that page. Now, when I click the "Check for Updates" button at the bottom of the window it says I have none - even though my App Store icon confirms for me that I indeed have several updates ready to roll.
    I have de-authorized, re-authorized, restarted (computer and iPhone), re-logged into my account, and even deleted some and re-downloaded some of the applications.
    Does anyone know what might be happening?
    Thanks in advance,
    Max Izod

    you may need to uninstall and reinstall itunes. reauthorize the account after doing so.

  • HT1688 I can not restore and upgrade my Iphone 4. When i plug in to computer itune's restore and check for update buttons are not active.

    I can not restore and upgrade my Iphone 4. When i plug in to computer itune's restore and check for update buttons are not active. What is that mean?

    Razmee,
    Guess what? After posting, I read another thread on this topic where someone said they went to an Apple store and the tech person there added the optional username and password in the Outgoing Mail Server boxes, and then reset the phone again. Although I had tried resetting and restarting a few times today, I had NOT reset it after entering the username and password into the optional fields.
    When I entered my username and password into the optional fields, the iPhone entered checks (ticks) to the right of every entry; it had not done this earlier. (I didn't reset at this time, and the outgoing mail would still not transmit).
    So just now, I reset it and the outgoing email was sent!
    Thanks to you and this forum, it's a great ending to a few frustrating days.
    I hope this message helps others. Not only does everything have to be entered correctly in the respective boxes; but once everything is entered and you press the "Done" button, every box should then have a check mark next to it and then you must reset the phone.

  • How to check for locks on a table inside a program?

    Hi Gurus,
    Kindly let me know how to check for a lock on a particular table inside a program.I know that we can see locks on table held by a user from transaction SM12 but my requirement is to check for lock on MARA/MARC/MARV if lock exist then bypass my code else do the code.
    Kindly suggest or give code to check for a lock on a particular table.
    Thanks in advance
    Sudipto

    FAQ.  Locked.

  • How to check for updates on SCM packages?

    Hey guys,
    I wondered for some time now how to check for updates on SCM packages, i.e. -git
    or -svn ones. Updates for binary packages are automatically updated by pacman,
    no problem there. Checking for updates on non-SCM packages from the AUR is
    easily done with one of the various helper tools available (personally, I use
    slurpy).
    However, SCM packages can change without their PKGBUILD changing, so I'm not
    notified that I should recompile and update them.
    Is there a "proper" way of doing this? Am I missing something?
    Thanks in advance!

    If your system is booting then u can say that your bootblks are installed.Usually BootBlks are present in 0 & 1 slice of UFS Filesystem
    /usr/platform/platform-name/lib/fs/ufs
    directory where ufs boot objects reside.
    An x86 FDISK partition for the Solaris software begins with a one-cylinder boot slice, which contains the partition boot program (pboot) in the first sector, the standard Solaris disk label and volume table of contents (VTOC) in the second and third sectors, and the bootblk program in the fourth and subsequent sectors. When the FDISK partition for the Solaris software is the active partition, the master boot program (mboot) reads the partition boot program in the first sector into memory and jumps to it. It in turn reads the bootblk program into memory and jumps to it. Regardless of the type of the active partition, if the drive contains multiple FDISK partitions, the user is given the opportunity to reboot another partition.

  • I cant update my iphone and i tried going on my pc on itunes and clicking check for update button but it says that "itunes could not contact the iphone software update server because you are not connected to the internet".plz help

    i cant update my iphone and i tried going on my pc on itunes and clicking check for update button but it says that "itunes could not contact the iphone software update server because you are not connected to the internet". But i checked my internet on both my pc and iphone and tried again but it still says the same thing. plzz plzz help

    Were you definitely connected to the internet at the time? If you don't have iOS 5 on your iPhone then the only way to update it would be via iTunes, once updated to the latest version of iOS you'll be able to update your iPhone without connecting to iTunes "over-the-air".
    Before updating however it goes without saying to Backup your iPhone, this should happen by default upon connecting your iPhone to iTunes.
    Regards,
    Steve

  • Continue to hit the check for update button ?????

    Update is not working here as well…
    Should I just leave the phone plugged in and will the system continue to check for the update OR should I continue to hit the check for update button…
    PLEASE ADVISE

    Update isn't working for any of us...I just called AT & T to see if I could switch on my old blackberry...they were friendly and helpful sure you can buy a new simcard for $25.00 bucks and then when you get your apple updated we can turn you on to the new service but you will be treated like the new apple 3g folks..A new contract and the difference in costs...GEEZZZ so it looks like my apple is doing me nothing...So I am screwed today no phone.....Thank you AT & T and Apple...One would think they would be hit with an increase in bandwidth and they would prepare for it...

  • How to check for impacts due to upgrade

    We are plannining to upgrade from 4.7 to ECC6..How to check for impacts on FTP'S,shell scripts and RFC's etc due to the assesment..Please suggest

    Hi,
    FTP's and Shell scripts are OS dependant not SAP or Database dependant so there will be no change at all unless you upgrade OS too. RFC's are not afected as per guides, notes and my experience.
    I´m doing an upgrade from 4.6C to 6.0 with connections with at least 10 systems and none of them had an issue during tests
    Good luck

  • How to check for bootblk on Disk

    Does someone know how to check for bootblk on solaris disk.

    If your system is booting then u can say that your bootblks are installed.Usually BootBlks are present in 0 & 1 slice of UFS Filesystem
    /usr/platform/platform-name/lib/fs/ufs
    directory where ufs boot objects reside.
    An x86 FDISK partition for the Solaris software begins with a one-cylinder boot slice, which contains the partition boot program (pboot) in the first sector, the standard Solaris disk label and volume table of contents (VTOC) in the second and third sectors, and the bootblk program in the fourth and subsequent sectors. When the FDISK partition for the Solaris software is the active partition, the master boot program (mboot) reads the partition boot program in the first sector into memory and jumps to it. It in turn reads the bootblk program into memory and jumps to it. Regardless of the type of the active partition, if the drive contains multiple FDISK partitions, the user is given the opportunity to reboot another partition.

Maybe you are looking for

  • Illustrator CC won't open

    Hi-- I just tried to open AI from Creative Cloud and it won't open. This may have had to do with a cleanup operation I did yesterday. Here's the problem report. I have no idea what to make of it. Can anyone help? Process:         Adobe Illustrator [1

  • My magnifier (the magnifying glass icon) has disappeared. How do I restore it?

    I am trying to get rid of a program I accidentally downloaded. The instructions say to click on the magnifier to begin. Well, it was there but now it is gone. How do I get it back?

  • Change of Currency

    Hi everyone, I want to know how to change the type of currency in a report. They ask me to change the currency from DOP to USD in the report (transaction ME49). It has been a hassle to me because first of all I'm new in ABAP. can someone help me? Tha

  • How to change WBS code to description in IM52

    Hi All, I am using Investment Management. I would like to distribute budget in IM52. but in IM52 it shows the WBS code not the wbs description, how to make it change to description ? Please help. Cheers, Nies

  • Returning cursor

    Hi, I am having function returning ref cursor.I am assigning all the output values into ref cursor but getting error while returning cursor. When I am trying to print value in a loop its showing correct output but while returning the cursor giving er