I may of coded myself from actually doing what I am asking help on?? Thus, need expert help... Am at the beginning of building a pretend online business (buying used books) for a class assignment -- don't worry if it's odd as it's not gonna be used in real life. Working on designing main page for now.
Problem Area: Need help with tables:
Situation:
Coded a TEXTAREA that appears on the left side of a table for a person to enter their ISBN, this also has imbedded tables so it is very very confusing ...
Predicament:
The goal is to eventually have the search results display on the right side of this table/same screen. (No, nothing for that has even been built yet)
Question:
If someone would please view/execute my attached text file, then you will see what I mean. It needs to be an html file in order to run. After that, can you show me how to get something/anything to appear on the right side of this table? If I can just see how to make that happen, then I can go forward. THIS IS WHERE I AM STUCK, I DO NOT KNOW HOW TO GET TO THE RIGHT SIDE?
Did I maybe code it too weird so that it cannot be done using what I have and have to start over?? I hope that's not the case.
Thank You.
PeOfEo
06-20-2003, 11:00 PM
ok you really do not need to be nesting that many tables and css would clean that up a lot. I am working on a new scc layout right now inface and it can get the desired affect with a lot less code. The attached text should accheive the affect you described (unless I misunderstood you) but pleas enot your code is full of errors and you are nesting way too many tables for this type off application. I will post a cleaned up version later if you would like.
PeOfEo
06-20-2003, 11:04 PM
also until you have figured out which server side language you are going to use you really should not be using html and making a template for this at this time. Unless you are using some cgi I think you have made a mistake in doing this in html.
CalifNina
06-20-2003, 11:22 PM
OK, appreciate the advice. But did you run my file and see how it all came out? It came out how I wanted it to look on my end, only way I could figure out how to do it and there are so many ways one can code.
CSS, yeah I know what that is but have not tried it yet - but I know what you are talking about.
Yes, I'd like to see a cleaned up version if you have time to do it sometime, that'd be GREAT!! Even though my code is not right as you stated, yet it did get the end result of what I wanted to do thus far.
But sure, I'll take whatever improvement you can offer with more expert coding, this is how I am learning.
Thank you PeOfEo ;)
spufi
06-20-2003, 11:47 PM
I have not looked at the original code that was posted, but I do want to say that if code is used that the student isn't supposed to know about yet, ie CSS, then the student may get a lower score because of it. Yes, I have taken classes before and had to "dumb" down my code. *sigh* The point is for the student to learn a certain thing about the subject they are learning about. It does not matter if they already know a more advance/better way of doing it.
CalifNina
06-21-2003, 12:05 AM
Got it spufi. As the saying goes "Nine ways to skin a cat", can only work with what I have tried so far and what I know. As far as I was concerned what I have so far is ok. I did get my end result and also got stuck with a new issue.
Was just looking for help from anyone who could and to see how to get past my issue of getting other items to display on the right side. I know it's doable somehow.
If you would look at my code and give me your opinion too? Never hurts to get as much advice as possible. Everyone has diff methods and opinions, the more the better. I take it all in and use what I can.
PeOfEo
06-21-2003, 12:11 AM
well you can still use tables but I dont think you should be nesting so many. You easily avoid nesting so many by using rowspan and colspan.
spufi
06-21-2003, 12:18 AM
Ok, I looked at the code and it's fairly straight forward. I can strip it down and make a very "school code" version of the site after I get some sleep.
CalifNina
06-21-2003, 12:43 AM
PeOfEo - I hear you and know there are many attributes that are more concise or efficient with tables. I am only at beginner level and can only do so much. You know how it is with coding, it's a forever learning thing - you learn in steps and pieces as you go along along with other examples ... and continue to improve from there. If you are still willing to show me your improved version I will take it and study it on my own to ascertain what you built and how it differs and if I get the whole concept, details, etc.
spufi - That'd be great if you would show me a stripped down version over the next day or so after you get your sleep. I definitely appreciate and look forward to what you are talking about, "school code" version, etc. Where I am at in class is we have covered HTML basics are are now into JavaScript basics.
As far as I'm concerned I have two people offering to help me, I could not be anymore happier!! I lucked out. ** Thank you both for the advice, direction, and possible code improvement. ** I do take it all in. I go off on my own and slowly review what people show or tell me, then I continue learning and working from there.
PeOfEo
06-21-2003, 12:46 AM
I have been working on a new version of your code with only one table. Its a little tricky but it might do the trick.
PeOfEo
06-21-2003, 12:54 AM
<HTML>
<HEAD>
<TITLE>Class Assignment - A Sample Business</TITLE>
</HEAD>
<font size="2" color="660000">
<strong>Step 1:</strong> Enter your book ISBN.<br>
<strong>Step 2:</strong> Click "Search" to locate book.<br>
<strong>Step 3:</strong> Review our offer<br>
<strong>Step 4:</strong> Sell us your book!<br>
<strong>Step 5:</strong> Upon receipt a check is sent!<br>
<strong>Step 6:</strong> <a href="condition.html"
Thats it! Notice I only used one table throught the whole thing. I just used the rowspan and colspan attributes extencivly. I do not have a working layout right now with css (i am working on one) But all of my table layouts perform similarly. I just dont like nesting tables because it falls apart on older ns versions and its a pain to deal with.
PeOfEo
06-21-2003, 12:58 AM
here is the text file if u want it.
PeOfEo
06-21-2003, 02:06 AM
Your teacher doesnt expect your forms to do anything correct? Or are you going to use an html email method or what?
CalifNina
06-21-2003, 11:46 AM
Wow that is georgous! PeOfEo You must've spent quite sometime on it. You did A LOT of work. How can I thank you enough for the hours you put in on this???!!?? Seriously..... I looked at the code you displayed in the reply, downloaded the text file, executed the html and am happy with the result! ... I see what you mean, the code is sooo much cleaner. I don't understand all the rowspan and columnspan stuff in how to actually use it - I get the concept and all but actually using it is another thing. I'll end up making a duplicate copy to play with and edit numbers/misc items to see how things react ... then I will start to get it much better... In essence, I will go through the whole thing line by line - but u get the jest of what I'm trying to explain.
As fas as nesting tables, I know that's a messy way to do it and believe me I got confused and spent hours on it, but was all I could muster and was glad that I did get my actual idea to show up on the screen. Honestly I did not even wanna attempt the rowspan colspan stuff, that was way beyond me. But your example is what I needed. Perfect. I have my homework in front of me on studying it thoroughly and very happy I have one method/example in front of me.
As far as the teacher, he knows all we know right now is a little html and javascript. I personally have not played with CSS at all, though it was lightly gone over. The idea on our pretend business was whatever idea we came up with -- in the end he does not expect the whole thing to work but wants to see a part or two or three working. Don't know yet what will be behind it and how it will all connect/work (he'll explain more at our next class) but I'm trying to keep it simple (thus the selling used books idea).
My Goal: I figured a person would enter an ISBN, then somehow in the background have a database that gets pulled from, then displays error or displays search results on the right side of the table (i.e., author/title/year/used book price/total, etc.) I have a couple popup windows that already work so that is covered. Don't think I'll have many pages (the bottom links -- i.e., contact us, about us, order status, etc.) working as that is just for show on what a real business would have, moreso it'll be entering the ISBN and having real data display --- don't think I'll actually have the order get processed as that would be way too complex and impossible and truly beyond this class?? It's all TBD at this point.
The teacher has mentioned: ASP, web databases, cookies, DHTML, but has yet to talk or show yet. I imagine as he starts to demonstrate these things I'll start seeing what I might use. All TBD.
I'm building this as I go along with certain stages due over the next week, two, and three. This was the first part, coming up with an idea and starting to build it
Oh gosh, I'm sorry, I have definitely blabbed enough in this reply, was just trying to explain where I'm coming from but unfortunately gets lenghthy.
Thank you sooo much for your time and effort I truely appreciate this working example that I can tweak further, learn from and use. You are awesome for doing this! :D ;)
PeOfEo
06-21-2003, 11:55 AM
colspan is where you stretch a table cell to go over so many columns. Row span is where you stretch a table cell to span over so many rows. Rows are horizontal coumns are vertical. So a colspan cell will be a horizontal rectangle and rowspan will be vertical. http://htmlgoodies.com/tutors/ad_table.html. Infact why dont you tun on your border, make it like 1 and look what all of the cells are doing :). It was not that much work. I just spent 15 minits and changed all of your table tags around.
CalifNina
06-21-2003, 12:07 PM
15 minutes, that's all it took you? Yup you know what you are doing. Ok you are smart and experienced with this, that's why I came here for help. ;) ... Thks for the explanation on col and row span, that helped. Also, did try the link you supplied but says it's moved or no longer in existance. No problem though... Yes, good idea - I've done that in the past too, turn the border on to see what it's doing. thks for reminding me! Again, I appreciate your ALL your help on this.
PeOfEo
06-21-2003, 12:13 PM
http://htmlgoodies.com/tutors/ad_table.html should work. Huh. Weird. Anyways your welcome. Thats what these forums are here for :D .
CalifNina
06-21-2003, 12:29 PM
yes, that link worked. Thank you!
spufi
06-21-2003, 02:58 PM
Actually if you want a good table layout showing you rowspan and colspan then look at the version I did for you. This basically is a in depth example showing all what a table can do. The <caption> tag can be taken out and I wouldn't miss it, but it's there just to show you what it does. The code validates as HTML 4.01 Trans. I figure that's about as current as I can get without touching CSS. I check it against IE and Mozilla. I even threw in a id="search" for when you are getting your results and you might want to target that specific <td> tag. Oh yeah, I took some liberties in the layout, but kept the idea fairly close to yours.
Seriously this version is soooo cool! Love the redesign and you even went extra and setup the results side of the table for me!!?? It's awesome! Excellent vision you came up with ... and you made it work.
How can I thank you for all your hard work?? I humbly appreciate what you constructed -- how long did it take you, an hour or two?? I'm sitting here with an absolute smile of gratitude. :D !!! You know your stuff.
You guys have outdone me BIG time. I know it's only programming but I think your work is beautiful! I know that sounds corny and it may be peanuts to others, but I appreciate all the details and effort put in. It's a perfect result. Plus, I will see more row and col span in action.
I really am thrilled with your version of coding. Both you and PeOfEo came through big time. I have been shown so much, many details to pickup on.
I've now gotta go through your coding line by line and study what you did, making my notes along the way. Thank You. You have been extremely gracious on following through with this. Going to go study it now.
spufi
06-22-2003, 02:48 PM
Here's some of the things I saw you could have improved on. One, although not technically needed, any non-empty tag should have a closing tag. Empty tags are tags like <meta>, <img>. etc. Basically any tag that doesn't have any info beyond the tag itself is an empty tag. Everything else qualifies for needing a closing tag. Again, this isn't technically needed until you move on to XHTML, but it helps out a bunch in trying to figure out where some tags begin, and where they end. You where missing some closing tags and you had some extra ones in there. I know I missed having a closing <tfoot> tag in my code and I'll edit the code to include it after I get done posting this.
Second, is you had some tags opening and closing like this.
<strong><small>Text</strong></small>
Technically this is correct and broswers are going to be able to understand what to do. This however won't validate in XHTML. This rework of the above code is the more desired way of doing it.
<strong><small>Text</small></strong>
The rule being here is that if you have an inner tag, it needs to close before you close the outer tag.
Third, sometimes you coded tags for each part of group of info when all you needed to do was use a tag to define it once around the whole section of info. Let's look at your fourth table code. You defined every line as the same color and size. I just went and defined that area once for the whole area as compared to you doing it for every line. I know PeOfEo changed you code on this in the same way as I did for his rework of your code.
I'm not sure how long it took me to redo your code, but the only reason it took as long as it did is because I used things like <thead>, <tfoot>, and <tbody> which I normally don't use mostly because I rarely use tables.
CalifNina
06-22-2003, 03:07 PM
Hi Spufi, nice to hear back from you.
Yeah I know about placing end tags in the same order they were first opened, those that I messed up was because I was inundated and probably just read it wrong or backwards, thus put the end tags in the incorrect order. But I know that rule well. I always dbl and triple check my code for errors, obviously I missed some areas in my proofing.
Agree with you in the areas where I put stuff on every line when I only needed to define it at the onset of that section, I keep telling myself to not do that, obviously I did it again. I'll make a point to improve there.
On the non-empty tags that needed closing tags, guess I missed those too. Thks for pointing it out, I'll make a point to clean that up. Who knows, maybe I was tired and trying shortcuts, but I totally hear you.
The thead, tfoot, and tbody were items I had not seen yet in use, so that was good exposure. Glad YOU fig'd it out! haha.
Thk you for the constructive criticism, these feedback tidbits are helpful and then I remember them as I go forward. Appreciate your followup and feedback. I have been tweaking away on the code from yesterday, adjusted a bunch of things and filled in my right side, so it has progressed quite well. :D
PeOfEo
06-22-2003, 03:46 PM
I dont think the thead and tfoot commands are very widly used by anyone as a matter of fact :)
spufi
06-22-2003, 06:24 PM
I actually almost posted the fact that I could have just as easily done a version with just <table>, <tr>, and <td> tags. The only real advantage of me doing it the way that I did was that if given a large amount of rows that one can use the other tags to help seperate certain content for the rest.
CalifNina
06-22-2003, 06:36 PM
I definitely know the basic table commands, whereas the thead, tfoot, tbody, etc., were the first I'd seen used.
But no matter -- you know how it goes with coding or actually anything one has to build -- there are "nine ways to skin a cat" -- just depends what method one selects or commands one is familiar with. The choices are endless.
PeOfEo
06-23-2003, 01:45 AM
eh I thought It was more convieniant using the colspan and rowspan commands but you completly changed his layout I was trying to mimic what he had before perhaps thats why we chose different methods spufi.
CalifNina
06-23-2003, 12:17 PM
I know your reply was for spufi but just letting you know I kept both versions. Still studying and playing with both, but had better progress with the second version. BTW, I'm a she not a he. ;)
webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved.