Javascript image selector problems

java , javascript Australia
  • 16 years ago

    I am working on a content management system where I have a page with textfields listed which contain the values of the image source for a particular product


    What I have is the textfield displaying the img src of the particular product which is populated from an Access database. (e.g /images/product1.gif)


    What I want to do is next to textbox have the word "SELECT" where it is a link which opens up a directory listing of all the images in a specific folder.


    1. Once you click the word "SELECT" it opens up a windows which displays the images in the folder.
    2. You then click on the image and it sets the text of the textfield to that URL of the particular image.Over riding the original content.
    3. I will then click update to update the database with the new image URL


    I already have a script which shows the images in a particular folder however I do not understand how if you click on the image, it closes the window and inserts the URL of the image into the textbox.


    Does anybody know of a script available to do this? Is is probably a simple javascript function however for the life of me I cannot figure it out.


    Any help would be greatly appreciated as this has got me stumped. Thanks

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Theory is when you know something, but it doesn't work. Practice is when something works, but you don't know why. Programmers combine theory and practice: Nothing works and they don't know why.”