Candace,
        Sounds like some tricky javascript, but surely can be done.
You're saying if you choose "upload new photo" it could open a small
window with a form that has a file upload form. If they choose "Add New
Link" it would open a small window with a single textbox to submit a
link...is that what you're thinking?
        I would try it a simpler way and just display the imagetype, and
probably display the image so you can see what you're dealing with. Then
have 3 radio buttons, New Image, New Link, and None. Then to the right
of the radio button you'd have a file upload input for the New Image. A
textbox for the new link, and nothing for the "None". See what I mean?
If you choose the new image button then the next page will accept the
file you uploaded. You should incorporate some validation on the backend
to send you back with a message if the form is submitted with "New
Image" selected but no value in the file upload etc.
        Let me know what you come up with.

Greg

-----Original Message-----
From: Candace Cottrell [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 10, 2002 7:32 PM
To: CF-Talk
Subject: Stuck Building Admin Area

Hello all you illustrious CF gurus. I am having a problem deciding on
how to arrange an edit app for an admin area.

I've got it all under control excpet for one thing: 
The image

Basically, the user can edit the book title, book author, etc. When they
add the book to the db, they select whether the image is an amazon link,
no image, or an upload.

Now when they go to edit the book, I want to give them the option of
changing the image type, uploading a new photo, or changing it to "No
Image".

I have a dropdown that is selected based on what's in the db for that
book.

        <select name="ImageType">
       <cfoutput query="getNewBook">
           <cfif New_Book_Image Contains "http://images.amazon.";>
           <option value="amazon" selected>Amazon</option>
           <cfelseif New_Book_Image IS "None"> 
            <option value="None" selected> No Image</option>
                <cfelse>
                <option value="Upload" selected>Upload</option>
                </cfif></cfoutput>
                    </select>

Ok, now I have two issues. Number one, I can see that my logic is off
for the dropdown. Only one of the options is showing up. I can probably
fix that.

The other issue is how do I allow them to change the image type, and
then based on which type they choose, open up a dialog box that will
allow them to add a link or upload a new file, and then post it back to
my form page? I know a former co-worker was using modal windows to do a
similar thing. Is this an option for me? I'm still fairly green (almost
like a sage color) to cf and programming in general, and hate to bug you
all about these simple things :)

I appreciate any help or insight you may be able to direct my way.

Candace K. Cottrell, Web Developer 
The Children's Medical Center 
One Children's Plaza 
Dayton, OH 45404 
937-641-4293 
http://www.childrensdayton.org

 
[EMAIL PROTECTED]

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to