List Menu, Javascript and Form Submit

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default List Menu, Javascript and Form Submit

    I am using a list menu to perform two tasks. First, it toggles a show/hide
    area based on the selected value using javascript. The I use an insert record
    to send the selected value to my DB. Here's my problem. My javascript
    show/hide region triggers based on the list menu 'value' field. Several items
    in my list menu need to show/hide the same region, but I need to send different
    values to my DB. In order for the javascript to work, the list menu 'value'
    fields must be the same, but this interferes with getting the correct value
    into my database. In summary, is there a way to send anything other than the
    'value' field to the DB when the form is inserted?

    gwalt Guest

  2. Similar Questions and Discussions

    1. How do i programmatic-ally change the Mouse Up-triggered JavaScript Action of a Submit button in a form contained in hundreds of PDFs?
      Hi Guys! How do i programmatically change the Mouse Up-triggered JavaScript Action of a Submit button in a form contained in hundreds of PDFs? In...
    2. List/Menu Form hides dropdown Menu
      http://2006.maximizer.com/about/customers/index.html when you scroll over 'company' in the main navbar at the top of the page, you'll see what...
    3. List/Menu Form item
      When the List/Menu form item is selected, what are the differences between specifying "List" or "Menu"? Brendan
    4. Form List problem with Javascript
      I have a list that is being generated dynamically from my MS SQL database. It basically lists a series of events in the database as the labels and...
    5. How to submit form and change value with JavaScript function?
      I have a problem. I would like to change a value from textbox with JavaScript before I submit the form (submit updated value). Can anyone please...
  3. #2

    Default Re: List Menu, Javascript and Form Submit

    1.- you could send to the DB the text the user sees in the dropdown:

    selectName.options[selectedIndex].text

    or

    2.- you could have an array with the values you want to insert into the
    DB and access them using the selectedIndex property to point to the
    correspondent element in the array

    HTH,

    manuel

    gwalt wrote:
    > I am using a list menu to perform two tasks. First, it toggles a show/hide
    > area based on the selected value using javascript. The I use an insert record
    > to send the selected value to my DB. Here's my problem. My javascript
    > show/hide region triggers based on the list menu 'value' field. Several items
    > in my list menu need to show/hide the same region, but I need to send different
    > values to my DB. In order for the javascript to work, the list menu 'value'
    > fields must be the same, but this interferes with getting the correct value
    > into my database. In summary, is there a way to send anything other than the
    > 'value' field to the DB when the form is inserted?
    >
    Manuel Socarras Guest

  4. #3

    Default Re: List Menu, Javascript and Form Submit

    Hi Manuel. Thanks for your post. I like option #1. How would I incorporate
    your snip of code into my code below? <select name='property_type'
    id='property_type'
    onChange='javascript:expand(document.getElementByI d(value))'>
    <option value='Home'>Home</option> <option
    value='Condo'>Condo</option> <option value='RentorLease'>
    Rent or Lease</option> <option value='VacationRental'> Vacation
    Rental</option> </select> Thanks for your help, Mark

    gwalt 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