|
-
Nov 28th, 2000, 08:16 AM
#1
Thread Starter
Member
Im probably in over my head here but if someone could give me a hint to what to do, i would be grateful.
I would like to do a webpage that look like this:
Left frame:
4 textboxes for userinput.
1 submit button to add the entries.
Mainframe:
When the user submits his info the mainframe should be refreshed with the new informations in a nice looking table.
The informations should be sorted by date and time (descending).
Also when the date that the user has submitted has been passed, the userinput should be deleted from the table.
How can i do this?
Kind regards
Frank
-
Nov 28th, 2000, 09:54 PM
#2
Frenzied Member
Well, approach it just like you should any problem - break it down into a set of smaller problems that are manageable. I'm kind of assuming you're using client-side scripting here, although server-side is just as easy if not easier. So what do you need? Well...
- 2 frames, left and main, with names so that you can make references to them in code (ie. they need identifiers). easy enough, just use the name property of the frames.
- A form in the left frame. This isn't hard.
- A submit button in the left frame. This doesn't have to be an actual HTML submit button, it can be a normal button. In the click event you need it to run your update code (VBScript or JavaScript, I prefer JavaScript personally).
- Some generic table outline HTML code, with dynamically generated rows. Your dynamically created rows can be made using a loop that will churn out the HTML for a row on each iteration, each time with a different set of data.
- A lot of time to fix all the bugs

I don't really know how/where/if you're planning to keep all the data of course. If it's client-side then it'll pretty much have to be cookies I think. Not entirely sure. I never found out how to use cookies in VBScript, so I'm not sure if you can use them with that, but it's simple enough in JavaScript with a few standard cookie writing/reading functions. You can probably get a lot of cookie code from the internet.
My main experience in web page design from a programming perspective is server-side ASP, so I'm not that well-versed in client-side scripting. Anyway, hope some of that has lent you some insight
Harry.
"From one thing, know ten thousand things."
-
Nov 29th, 2000, 02:41 AM
#3
Thread Starter
Member
Thanks for replying.
Well, i was thinking that a serverside solution would be the best. And i dont know how to make a database on a server.
Frank
-
Nov 29th, 2000, 03:44 AM
#4
Frenzied Member
Well it's not hard to use databases on a server, once the ODBC and all that malarkey is set up. I don't think I've done it myself but it's not too hard to register a database and get it working with SQL. I've used Access databases before, they've been fine for my needs.
You've basically got a choice of ASP or PHP. ASP costs money, PHP doesn't. If it's personal you may want PHP, if the company's paying then you may want ASP It's up to you, but PHP is probably marginally better. It's closer to C syntax, ASP is basically an object model that you use VBScript to interact with. It's not hard. You probably already know this anyway 
Basically once that's set up you can create a connection to your database, and get a recordset. Then from there it's just simple algorithms using loops to go through the data.
The code for serv-side scripting is going to be much the same as client side except that it's not bowser dependant (except for session variables which use cookies, but enough of that ). The same pronciples apply. So, have a go and see if you have any problems. If you do, you know where to come And one piece of advice - remember to delete objects when you've finished with them! I managed to bring down a whoile server by forgetting that *D'oh* 
Harry.
"From one thing, know ten thousand things."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|