It's amazing what you can do when you don't know any better....
Here's the tip:
I needed to upload a series of pictures and then display them with captions. In my table, each record has up to 6 associated pictures. So, I uploaded the photos to a directory named (not surprisingly) "photos" in the web root. Then created a grid, and chose a tab control of type "genie". Each pane contains one picture and one caption. The photo is control type Image and Display format <image>. A photo of the result is shown in screen1. It's nice. You can use the next and previous arrows to scroll through the photos. The picture shows picture 3. And, no programming!
Now for the question:
I tried to faithfully copy the code from the help to upload the pictures. Code I used was, in the head section:
And in the body:
But, along with the photo, I'm getting an errant "> See screen2.
I can't figure out where that's coming from. Any suggestions?
Pat
Here's the tip:
I needed to upload a series of pictures and then display them with captions. In my table, each record has up to 6 associated pictures. So, I uploaded the photos to a directory named (not surprisingly) "photos" in the web root. Then created a grid, and chose a tab control of type "genie". Each pane contains one picture and one caption. The photo is control type Image and Display format <image>. A photo of the result is shown in screen1. It's nice. You can use the next and previous arrows to scroll through the photos. The picture shows picture 3. And, no programming!
Now for the question:
I tried to faithfully copy the code from the help to upload the pictures. Code I used was, in the head section:
Code:
Dim vMsg1 as C = "Upload Property Photos. Photos must be jpg type, 600 pixels wide by 400 pixels high." vFilename=alltrim(session.listing_id)+"."+alltrim(session.which)+".jpg" if eval_valid("cmd") file.from_blob("c:\a5\A5Webroot\Photos\\"+vFilename, FileToUpload.data) fn="Photos/"+vFilename vMsg1 = "Photo "+FileToUpload.filename+" was uploaded as "+vFilename+"." tbl=table.open("[PathAlias.ADB_Path]\listings") indx=tbl.index_primary_put("listing_id") vRecNo=tbl.fetch_find(session.listing_id) if vRecNo>0 'was found tbl.change_begin() select case session.Which="1" tbl.Photo1=fn case session.Which="2" tbl.Photo2=fn case session.Which="3" tbl.Photo3=fn case session.Which="4" tbl.Photo4=fn case session.Which="5" tbl.Photo5=fn case session.Which="6" tbl.Photo6=fn end select tbl.change_end() end if tbl.close() end if
Code:
<p> <form action="<%a5 ?request.script_name %>" method ="post" enctype="multipart/form-data"> <input type="file" name="FileToUpload"> <input type="submit" name="cmd" value="Upload File"></form> </p>
I can't figure out where that's coming from. Any suggestions?
Pat
Comment