SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Refreshing or updating a dropdown menu

    Hi,

    I have a form on a website which allows the user to select an image from a dropdown menu (the contents of which are pulled from a database). There is also an option to add a new image, which opens up a popup window to allow the user to add a new image to the database then close the window.

    What I am looking for is the ability to refresh the dropdown menu automatically once the new image has been added without the user having to refresh the browser themselves.

    Is there a way i can achieve this with javascript?

    Thanks

  2. #2
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,631
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    When the popup closes (or the form submits and the page reloads in the popup), you could could maybe execute a .refresh() on the main (parent) window?
    Ian Anderson
    www.siteguru.co.uk

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, that was the way i would think about doing it too, but im not very good (at all!) with javascript so i dont know how I would go about doing that.

    Any ideas?

  4. #4
    SitePoint Wizard Pepejeria's Avatar
    Join Date
    Jan 2005
    Location
    Too far up north
    Posts
    1,566
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I suggest you learn the JavaScript basics (and only the basics). Once you have done that you will know the answer.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2006
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im kind of on a deadline and i just wanted to know if javascript would be suitable for this problem or not. I dont have the time right now to learn it. Bu hopefully I will soon.

    Never mind though. Ill have a look around. Thanks anyway.


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
  •