Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59

    Unanswered: Getting a listbox to work without using a submit button

    Hi
    I frear I'm having a slaphead moment
    I want to use a listbox to display some stuff from a db, for many reasons I'm having a frightmare with it

    Is it possible to use a select box such that if the user selects an item it automatically redirects based on content in the list box. Effectively similar to a listbox in a C++ / VB environment

    I can get it to work if I havea submit button but that complifies the user interface, and I' m not to sure my user base will accept or appreciate that.

    any ideas
    BTW the design brief says I can't use javascript / ecma script - just plain vanilla HTML & PHP

    Mark

  2. #2
    Join Date
    Apr 2005
    Location
    Baltimore, MD
    Posts
    297
    You would need something like this (which is javascript):
    HTML Code:
    <select onChange="this.form.submit();">
    That's the only way to get this problem to work because you will need some sort of client side scripting.

    There actually may be a way to do it using .NET web controls, but I think it may automatically generate javascript...and of course that's not php .

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    <select onChange="this.form.submit();">
    Thanks for that, works a treat, sadly we still have to keep the the submit button for thise not prepared to run JAVAScript

    Mark

Posting Permissions

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