Add Button : help please

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Add Button : help please

    I'm getting an error in the line 13 area - This one is really stumping me - any
    help or advice woiuld be most appreciated
    Regards Mark

    Button Code

    <cfparam name="formVal" default="Add to Cart">
    <cfparam name="symptom" default="">
    <cfif isdefined("form.submit")>
    <cfif form.submit eq FormVal>
    <cf_addItem symptom="#form.addsymptom#">
    </cfif>
    </cfif>
    <cfif len(id)
    <cfoutput>
    <center>
    <FORM action="#getfilefrompath(cgi.script_name)#?firstle tter=#firstletter#"
    method="post">
    <input type="hidden" name="addsymptom" value="#q3.symptom#">
    <input type="submit" name="submit" value="#formVal#">
    </form>
    </center>
    </cfoutput>
    </cfif>


    quiero mas Guest

  2. Similar Questions and Discussions

    1. Dynamically adding Dropdown, Text Box, Add Button and Remove Button
      Hi Everyone, I am facing a poblem in creating a row which contains following scenario in ASP.NET |DROP_DOWN_LIST | |TEXT_BOX| ...
    2. Opening a new window with a link button button column on a datagrid
      Hi all, I have a datagrid with a button column set as a link button. When clicked I want it to open a new window in which to display the results...
    3. HELP:Swapping spirtes for a button & Randomly activating a button [ newbie ]
      Hi - I have two questions - hope the cross posting is acceptable. 1. I have made some buttons using the mouseenter and leave behaviours that...
    4. How to select a button in a matrix of push button (Cocoa) ?
      The radion button was created with Interface Builder. How to make a default (selected) button in this matrix ?
    5. JavaScript Access to Button in form tags (webcontrol or html button)
      Hello, I have a button called LoadBtn, which exists in <form name="Form1" runat=server></form> tags. I then have javascript loaded outside of...
  3. #2

    Default Re: Add Button : help please

    Hard to say.
    What does your custom tag do?
    Where does your id variable come from?
    Is it possible for your submit button to have a value other than "Add to
    Cart"? If not, why is a variable?
    Where does your firstletter variable come from?
    What is the nature of the error you are getting?

    Dan Bracuk Guest

  4. #3

    Default Re: Add Button : help please

    If your code is a direct paste then your missing a closing bracket for the cfif
    <cfif len(id)

    Ken
    The ScareCrow Guest

  5. #4

    Default Re: Add Button : help please

    What does your custom tag do? The result of a query is added to a list while
    the user looks for other data to add.
    Symptoms: click on A get results - choose appropriate reults - click add -
    click back - new search - add results and so on
    Where does your id variable come from?
    Is it possible for your submit button to have a value other than "Add to
    Cart"? i hope to label it add to symptom list - this value is as is - found a
    tutorial
    If not, why is a variable?

    Where does your firstletter variable come from? What do you mean by this
    question? Data source? Sorry still very new to the game

    What is the nature of the error you are getting? I use a Japanese OS so
    basically the error is something to do with a piece of code or lack of it in
    line 13 (vague? sorry will look again)

    Thank for taking the time to write out questions - i can see the process
    though which I have to go through to solve problems
    Problame is not really sure what i am doing

    Regards MArk

    quiero mas Guest

  6. #5

    Default Re: Add Button : help please

    Scarecrow - Where would iclose it off? Sorry very new to the game

    Regards
    Mark - a litle scared
    quiero mas Guest

  7. #6

    Default Re: Add Button : help please

    I'm not getting the eror anymore - thanks a lot to Dan and the scary crow.
    I will research the areas Dan quizzed me about and if i have trouble please
    point me in the right direction again.

    Step by step
    Thank you all

    quiero mas Guest

  8. #7

    Default Re: Add Button : help please

    I assume that you have fixed this, but just in case

    <cfif len(id)

    should be

    <cfif len(id)>

    Although, I'm not really sure that this is what you want.
    This basically says if the length of the id is greater than zero do what's in
    the cfif
    So if the id was 100 for example then the length is 3 and if the id is zero
    then then length is 1 and the cfif would be performed.


    Ken

    The ScareCrow Guest

  9. #8

    Default Re: Add Button : help please

    T o be honest scarecrow im new to the game - just trying to be able add
    something to a list while a user makes other choices and also adds these - i
    found a shopping cart tutorial at web monkey so have been trying to manipulate
    it to do what i want.
    i m trying to connect a check box and the add button - not really sure how to
    go about it
    any ideas?
    thanks for your time
    MArk

    quiero mas Guest

  10. #9

    Default Re: Add Button : help please

    yes thanks i had added the >
    regards
    Mark
    quiero mas Guest

  11. #10

    Default Re: Add Button : help please

    i m trying to connect a check box and the add button

    I assume you need to access the value of the checkbox after the form is
    submitted.

    You need to check if the field is defined

    <cfif IsDefined("form.myCheckBox")>
    do what you need here
    </cfif>

    Ken

    The ScareCrow Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139