38 users online (0 members and 38 guests)  


  Results 1 to 5 of 5

Related

  1. Replies: 6
  2. Replies: 25
  3. Drop Down menu "other" *ree text option    Forum: HTML Forum
    Replies: 3
  4. Replies: 4
  5. video option    Forum: General Discussion
    Replies: 0
  1. #1
    Unregistered
    Unregistered's Avatar
    Guest

    Dynamically Update Option Value Menu Item

    Hi:

    Is there a way to dynamically update an option value menu item? For example,

    <option value="action" > Add </option>

    change the color of "Add" so it appears grayed out to the user if they select a particular checkbox.

    Thanks,

    Koch

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hiya Koch.

    Hmm. Thats a tricky one.

    it would have to be JavaScript to do it live.

    or you could use server-sdie script like php to chieve the effect, but that would only effect forms on the next page.

    not sure if you could achieve this with JavaScript to be honest.

    Which one r u after?
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    Unregistered
    Unregistered's Avatar
    Guest
    Hi Dean:

    Thanks for the help. I had thought about JavaScript as well but wasn't sure how to do it. Sounds like the only way would be to update the option value menu item on the form on the next page.

    Thanks,

    Koch

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Cool.

    Okay, this is the jist of it.

    Using a server-side language (i am going to use PHP as an example, as I familiar with it) we could pick up which options the user had submitted on the last page.

    With PHP, you give a variable a name -

    Code:
    <input type="text" name="badger">
    Then, in the PHP script that the form posts to, you have a new variable called $badger .

    If your code says

    echo $badger

    It will write whatever the user posted in the form to the page.

    Obviously, it can get more powerful than that, using 'if' statements and stuff.


    Do you have knowledge of any server-side scripts?

    If not, I recommend php.

    goos resources for php -

    http://www.php.net
    http://www.phpbuilder.com
    http://www.zend.com

    Good Luck.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  5. #5
    Unregistered
    Unregistered's Avatar
    Guest
    Thanks Dean. It sounds like php will do the trick for us.

    Thanks again,

    Koch



Tags for this Thread