 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

June 8th, 2005, 08:55 PM
|
|
Authorized User
|
|
Join Date: May 2005
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Tricky asp/sql problem
Hi all,
Working on a smaple tracking system - yoiu don't really have to know that - but here is the dilema:
I Have the following fields
Freezer
Tower
Box
location
ID#
Based on the first three fields I can have 100 different locations
Each one of those can be or is filled with data.
The problem I have is in order to update the "location" field users have to be able to know if there is data in it. The method I am working on displays 100 buttons (each button is associated with a form) I need to figure out a way to have the button display the "ID#" (or lack there of) based on its "location" (001 through 100) I thought I could do a dynamic field based off of a recordset query - and I can sort of - to get an "ID#" in it - but it isn't an "ID#" associated specifically with the "location"
Anyway - not sure how clear this is - but any help would be appreciated.
ps. I have seen something very similiar done with PHP and My SQL
I am using asp and access + Dreamweaver MX
|
|

June 9th, 2005, 01:14 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi Chris,
Can you elaborate a bit about what you're trying to accomplish as I not clear on what you want.
Also, 100 (!!) buttons on a screen is way too much from a UI design perspective. Users will get lost with such screens. Isn't there another way to present your data?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

June 9th, 2005, 02:30 PM
|
|
Authorized User
|
|
Join Date: May 2005
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar,
I sent you a brief email with the site info - I shoudl have told you to select freezer cryo-3, tower 1 and box a on the main page.
I hope you can figure out what I am trying to do - the buttons (while there are a ton) are not to confusing - mostly the user is going to look for the next open record and click that to add a record to it. As far as showing the UPN# in the button - if they need to edit a record - it makes it easier for them to find it.
Thanks for your time!
Chris
|
|

June 9th, 2005, 03:09 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Right, I took a quick peek. (I also tried to hack the site using Sql injection but that didn't work ;) )
Anyway, I am still not sure what you want. IMO, there is no need for all those forms; they basically repeat itself so you could wrap all the 100 buttons in one form. But then what? What's the idea behind this?
Are you trying to find out *which* of the 100 buttons was clicked?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

June 9th, 2005, 08:57 PM
|
|
Authorized User
|
|
Join Date: May 2005
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar,
The idea is that the buttons are a visable representation of the location within the box, which is in the tower, which is in the freezer.
The idea is - I couild click box any box and it would allow me to add/edit/update the information for that location.
I thought about doing it as one big form - but couldn't figure out how to have the button value = the UPN# - it is all kind of confusing - it makes sense on this side, but only because I work with the people who need this.
Essentially - what happens is - you click the button and the edit page comes up - the button transfers it value (001-100) - which I then use to edit that specific location.
Thanks for looking - I know it is really odd! I am happy you weren't able to hack the site!!
Chris
|
|

June 11th, 2005, 06:17 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Maybe I am thick, but this doesn't make a lot of sense to me:
Quote:
quote:The idea is that the buttons are a visable representation of the location within the box, which is in the tower, which is in the freezer.
The idea is - I couild click box any box and it would allow me to add/edit/update the information for that location.
|
Box, tower, freezer.... Sounds like a lot of jargon to me.
Anyway, what you could do is create one form, give each button the same name and a different value. The following short example shows you what I mean:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<%
Response.Write("That is " & Request.Form("btnSubmit"))
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form method="post">
<input type="submit" name="btnSubmit" value="1" />
<input type="submit" name="btnSubmit" value="2" />
<input type="submit" name="btnSubmit" value="3" />
</form>
</body>
</html>
Is this what you're after? If not, can you explain what exactly you need to do?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|
|

June 13th, 2005, 09:12 AM
|
|
Authorized User
|
|
Join Date: May 2005
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar,
Thanks for looking at the problem - I have discovered a solution -if you still have the link you can take a look - if you submit the default layout - you will see the buttons with populated data - the blank buttons do not have any data. If you switch over to box b - you will see there is hardly any data. Basically - the button value is dynamic.
Chris
|
|

June 13th, 2005, 01:07 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Aha, I see now. I agree it makes more sense now, having 100 buttons on one screen....
So how did you fix it? By adding a hidden field to each of the buttons?
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Frantic by Metallica (Track 1 from the album: St.Anger) What's This?
|
|

June 13th, 2005, 04:02 PM
|
|
Authorized User
|
|
Join Date: May 2005
Posts: 57
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar,
The fix was awful - yes there is a hidden field for each form/button. Additionally, there is a seperate recordset for each button so I could pull the actual value I needed - I know that this isn't the best way to do it - but couldn't come up with any other method - I do CLOSE the recordsets immediately after I pull the data though - and the speed seems pretty good.
I am sure I will have a few more questions before I am done!
Thanks,
Chris
|
|
 |