#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    9
    Rep Power
    0

    populating text field with javascript?


    I wanted to populate a text field and possibly refresh the page so it can output a query correctly (keeping the populated data so coldfusion will see that data and populate the field correctly when it interprets the code?). My reasoning behind it is i have a page that querys a database selecting everything in a table. (using coldfusion) then populates a dropdown with a certain column of that data (on load). I want it to populate the text field depending on which option you select in the dropdown (with another column of data). Is this possible? thanks!
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    9
    Rep Power
    0
    is this possible at all? please help me i really need to know as its urgent =/ , thanks =)))
  4. #3
  5. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1100
    Code:
    <form>
    <input type="text" name="foo" value="" /><br />
    <select onchange="this.form.foo.value=this.options[this.selectedIndex].value">
      <option ...>
    </select>
    </form>
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    9
    Rep Power
    0
    i realize that, but if i populate it with #sftr_sn# (coldfusion column i want it to populate w/) it wont show up as a SN itll show up as #sftr_sn# because cold fusion hasnt interpreted that, it is just showing up on your computer, never interpreted by the server =/. any ideas? (im thinking maybe make an array w/ that whole clumn and then just match up the dropdown liste # w/ the array full of serial #'s # (too bad u cant combine php and ColdFusion). anyway any other help would be appriciated. Thanks So much.

IMN logo majestic logo threadwatch logo seochat tools logo