Results 1 to 4 of 4

Thread: Help to activate info in Iframe using MySQL data in listbox to

  1. #1
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question Help to activate info in Iframe using MySQL data in listbox to

    Hi Folks,

    I have three list boxes that populate names from MySQL.

    What I would like to do is instead of using the GO button, pick on the name in the list. Once the name is picked specific information relating to that person will appear in the Iframe.

    Please check this link out to see what I propose.

    If there is anyone who can help I will be more than happy.

    Regards
    Rob

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You only want to replace the "go" button with an automated change?
    This isn't related to PHP or MySQL. All you need is Javascript, and very simple Javascript:
    <select onChange="this.form.submit();">
    That should do what you want. If you have problems with the MySQL/PHP, then this will need to be done on the page within the iframe, based on the sent information.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    May 2007
    Location
    South Africa
    Posts
    175
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hi,

    Thanks for the prompt reply.

    You are correct - in that MySQL doesn't do it.

    Ajax is currently providing what I have.

    So if I am correct in what you are suggesting is that I can do away with the "GO" button and make this change

    Code:
    <select onChange="this.form.submit();">
    Would I be correct in saying that the name of the Iframe would be between ()?

    Regards
    Rob

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    No, that doesn't yet do anything for the iframe. That code just submits the form automatically when you change the value of the select. You could set <form ... target="ifranename"> and then it would do what you want. (Target is apparently not part of the newer/stricter forms of valid html, but it works fine, and I don't really see a better alternative here.)
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

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