Print Page | Close Window

A polite request for help...

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=577
Printed Date: 29 March 2026 at 10:29am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: A polite request for help...
Posted By: slave
Subject: A polite request for help...
Date Posted: 27 February 2003 at 4:07pm

Hi, I need a spot of help... You can skip the pre-amble story if you like... by the way, i'm relatively new to this but i have little bit of knowledge...

I'm currently putting together a small website for a photographer and I'm doing it using ASP/Access so she can upload the photos herself and i don't have to be messing about with it every five minutes whenever she's taken a new pic...

It will basically be a frame on the left with some thumbnails (generated by ASPJpeg, I sussed that out, eventually) which, originally, she wanted the ordered by the date she uploaded them (which was easy enough as i just got it to datestamp the record in the DB)

However... she now wants to be able to change the order of the thumbnails herself which, at first, i thought would be kinda simple...

I added a 'picorder' field to the DB which was set up as a 'number' and i planned on setting up a page for her which would put all the thumbs into a list with a textbox next to each one where she would simply tap in a number ('1' for the first she wanted in the list, '2' for the second and so on) and then hit an 'update order' button, but i've no idea how to make a page that updates 20-odd records at once, i can only do single records...

So, can anyone help me on this?

If i dont work this out she will sack and/or stab me...




Replies:
Posted By: MorningZ
Date Posted: 27 February 2003 at 4:34pm
have something like (all stuff in parenthesis i don't know what it's called in your DB:

<%
Do while not rst.EOF %>
<input type="text" name="pic<%= rst("PicID") %>" value="<%= rst("picOrder") %>"/>
<%
rst.MoveNext
Loop
%>


and when you process them, extract the ID out of the name and update the DB, for example

<%
if however you check that the form is posted then
   For each item in Request.Form
     if Left(item,3) = "pic" then 'We have a pic order field
        ThisID = Mid(item,4)    'Extracts the ID from the Field's Name
        strSQL = "UPDATE table SET picorder = " & Request.Form(item) & _
           " WHERE PicID = " & ThisID
        objConn.Execute(strSQL)
     end if
   Next
end if
%>


-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: slave
Date Posted: 27 February 2003 at 5:11pm
ok thanks i'll give that a whirl


Posted By: slave
Date Posted: 27 February 2003 at 6:57pm

Thanks so much, that works great

 



Posted By: faubo
Date Posted: 27 February 2003 at 9:54pm

Suggestion for your own sake:

take a little look in Server Side Includes (SSI), in order to not use frames, they can mess up a lot of things and SSI can do exactly the same without the trouble.



-------------
http://www.conhecerparaconservar.org - I don't know how to make you click here


Posted By: MorningZ
Date Posted: 27 February 2003 at 11:11pm
i dont see any situation where frames would cause an issue on a layout like he desribes, its not going to get in the way of anything

-------------
Contribute to the working anarchy we fondly call the Internet


Posted By: faubo
Date Posted: 28 February 2003 at 1:38am
Don't frames mess with some brownsers and give a hard time to some robots of search engines?

-------------
http://www.conhecerparaconservar.org - I don't know how to make you click here



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net