Refresh individual Dynamic dropdown

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • d1156676
    New Member
    • Feb 2008
    • 3

    #1

    Refresh individual Dynamic dropdown

    Hi

    I have a Dynamic dropdown reading in data from a MySql database, I need to refresh the dropdown when the database is updated without refreshing the whole page.

    I have had a go at trying to use a javascript and getelementbyid but with no sucess.

    Does any ones have any example or have any ideas on how i can do this.


    Any help will greatly appreciated

    Regards

    Kris
  • stepterr
    New Member
    • Nov 2007
    • 157

    #2
    Originally posted by d1156676
    Hi

    I have a Dynamic dropdown reading in data from a MySql database, I need to refresh the dropdown when the database is updated without refreshing the whole page.

    I have had a go at trying to use a javascript and getelementbyid but with no sucess.

    Does any ones have any example or have any ideas on how i can do this.


    Any help will greatly appreciated

    Regards

    Kris
    Javascript is the way I would go with something like this. Can you post what you have attempted? Then maybe we can help you make adjustments to the code to help you get it working.

    Comment

    • d1156676
      New Member
      • Feb 2008
      • 3

      #3
      Hello stepterr

      thanks for you advice :)

      i will upload what i have attempted

      Kris

      Comment

      • d1156676
        New Member
        • Feb 2008
        • 3

        #4
        Here is what I have being playing with, at the moment when I click on the link the words "Refresh Div" is inserted into the refresh div.

        <html>
        <head>
        <script type="text/javascript">
        <!--
        function Content()
        {
        document.getEle mentById("refre sh").innerHTM L = "Refresh Div"
        }

        </script>

        <body>

        <div style="backgrou nd: #6699FF">
        Main Body Div
        <div id="refresh" style="backgrou nd: #FFFFFF">
        <a href="#" onclick="Conten t()">Refresh</a>
        </div>
        Main Body Div
        </div>
        </body>
        </html>

        Comment

        Working...