Basic javascript and an ASP/SQL Question
Javascript question -
I am building a form where the phone number if broken up into 3 text boxes. The first one is the area code, then next 3, then the last 4 digits. The user wants the focus to be moved to the next box once the length is correct on the current box. I know this would be javascript that would make this happend, but I'm not sure how to make this happen. Any help would be greatly appreciated.
ASP/SQL question -
(Different form from the one mentioned above) The form being used is for a call center which has close to 50 checkboxes of things that could be sold. The idea behind this is for the user to check the box indicating a sale. The data input team will then need a form which will display each sale in a list. I can use IF statements all day and make this work but it doesn't seem like the best way to approach this project. Any other solution or suggestion would be very helpful.
My Assumption (SQL pulls all data where status = 'Open'... then it will only display the field names where rst.field.value = 'True' (Yes/No Field in Access). I am assuming this can be done but I can't find documentation showing me the process.)
Thanks for any help.
Art
artsapimp posted this at 18:04 — 21st May 2001.
They have: 330 posts
Joined: Apr 2000
I figured out the javascript portion of my original question. I am still confused about the best way to do the ASP as explained above. Thanks for any help.
Free Math Test
Fun Math Games
ShinNathan posted this at 02:34 — 22nd May 2001.
They have: 46 posts
Joined: Dec 2000
How did you solve the js prob?
As for the asp, I think you will have to use many ifs.
But maybe you could name the checkboxes 1 to whatever and use a loop to check them?..
like:
---------------------------------------------------------
for x = 1 to 50 ' or what ever a for next loop looks like
if request.form(x) = checked then
upload to database
end if
x = x + 1
next
----------------------------------------------------------
Maybe this would work?
Nasanu.org
artsapimp posted this at 14:00 — 22nd May 2001.
They have: 330 posts
Joined: Apr 2000
What I ended up doing with the ASP is creating 2 tables for the sale. One is the customer table and the other is an ItemsSold table. The customer form is populated with the customer's information which is the top few textboxes on the form. It then closes that table and opens the ItemsSold table and writes the RecordID from the customer's table into a customer field and then loops all checked items and writes a new record for each of them under the ItemSold field.
It's not the best way to build it if reporting was the most important feature needed, but pulling the data out of the database is #1 for this project so this is the easiest on the server.
...and Yes, I found another site which was doing the redirection from one textbox to another and I taught myself how to do it by viewing the sourcecode, pretty easy!
Thanks for the response.
Free Math Test
Fun Math Games
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.