|
Woops. I read your question completely wrong. Go with Roger's answer
Paul
|
|
|
|
|
leppie wrote:
I have a TextArea in a TABLE, but I want it t occupy the width of the table. How can this be done? COLS property is not handy at all!
Use CSS like so:
<table style="width:400px; height: 400px;">
<tr>
<td>Description</td>
<td style="width: 200px;"><textarea id="txtDescription style="width: 100%; height: 100%"></textarea></td>
</tr>
</table>
In that example you are "telling" the textarea element to fill it's containing elements available space by using the 100% attribute value.
CSS rocks people, use it
|
|
|
|
|
Paul Watson wrote:
CSS rocks people, use it
I use where I can It does get confusing sometimes though
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
I was under the impression that CSS has serious limitations with uniform behavior over a variety of browsers, so I've been sticking to what I can do with the basics. Is that not the case anymore?
Word of the day: Rotundacrat
Extra Credit will be awarded for: Quasimobo...
|
|
|
|
|
Roger Wright wrote:
I was under the impression that CSS has serious limitations with uniform behavior over a variety of browsers, so I've been sticking to what I can do with the basics. Is that not the case anymore?
It's less true since NS6 came out but it can still be a pain. I guess it depends if you want to be able to appeal to the 5%-or-so of people who refuse to use IE
Paul
|
|
|
|
|
Roger Wright wrote:
I was under the impression that CSS has serious limitations with uniform behavior over a variety of browsers, so I've been sticking to what I can do with the basics. Is that not the case anymore?
Yes and no.
This is tough to explain without you spending a good amount of time learning CSS.
Ok, if you HAVE to "support" Netscape 4.x then CSS is going to give you a lot of trouble. N4 does not have enough CSS support and also does CSS wrong i.e. it implemented the standard incorrectly.
If you have to support IE4 then you will still need to use TABLEs for layout but at least you can use a good deal of CSS formatting which is better than not using it.
If you need to support IE5.x then things are looking up. There are a few issues but they can be worked around.
If you need to only support IE6 and Netscape 6 then you are two steps away from heaven. They do a great job of supporting CSS.
Considering that Netscape 4.x has a miniscule portion of the market and so does IE4 you really can be using CSS right now. Obviously there are different levels in CSS, mainly two: Formatting and layout/positioning. Formatting is fine and IE4 and up supports it well enough. Layout though is only really doable in IE5 and up (including Netscape 6, Mozilla 1.0, Opera 6.0 etc.)
But all of this is a mute point. We should not be coding towards specific browsers. We should be implementing the standards and ensuring that what we do code is accesible to every agent and device (from PC to cell phone to PDA to text readers for the blind.) So what if it is a few pixels out on one browser, so long as the visitor can a: navigate, b: read your content and c: buy your goods then we are doing the right thing. The web is about access to information to all. Actually using TABLE layouts, FONT tags etc. is counter to this prime directive.
Bottom line for me is: CSS makes maintaining and changing a site an absolute bliss. You just change one central file to re-layout and re-format your site. Try that with the old way
Anyway from all the CSS talk lately I think an article is in need. But before that read AListApart.com for some damned good info on real world CSS, HTML etc.
|
|
|
|
|
Good points, Paul. Thanks for the info, and I quite agree with the philosophy of coding to the standard. A comprehensive article would be most welcome!
Word of the day: Rotundacrat
Extra Credit will be awarded for: Quasimobo...
|
|
|
|
|
Hi all (and Paul, you seem to be the one replying )
I discovered the beauty of the "display:none" property. Now this works like a dream to show/hide my table details
Now on client side, i want to some extra HTML below each table that can be shown on or off, but inserting the "same" HTML below each table (maybe as much as 50) seems to me like a HUGE bandwidth buster!
Now is there a way I can insert the code at client-side via JavaScript only when it needs to be shown? I see JavaScript has a method to output HTML, but how does one do this?
Cheers, any help appreciated
Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
leppie wrote:
Hi all (and Paul, you seem to be the one replying )
Hi leppie
That's what I like about you; a new challenge every day
Is there any reason you can't have a variable containing the text you want, an empty DIV under each table and then use javascript to set the text in the DIV at the same time as making it visible?
I would tend to avoid going back to the server for it if humanly possible.
Paul
|
|
|
|
|
Paul Riley wrote:
That's what I like about you; a new challenge every day
Need to move fast!
Paul Riley wrote:
Is there any reason you can't have a variable containing the text you want, an empty DIV under each table and then use javascript to set the text in the DIV at the same time as making it visible?
Erm, wasnt that MY question? How do I do that? I have 2 days JavaScript experience, although modifying code is no problem, creating it from scratch is
Paul Riley wrote:
I would tend to avoid going back to the server for it if humanly possible.
Especially if you consider the page size is mostly very big already
Thanx
Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
leppie wrote:
Erm, wasnt that MY question? How do I do that?
Wasn't sure that was your question, now that I know it is... I think it's divName.innerHTML = "<b>This is my text</b>";
It's been a long time since I've done anything like this but I'm fairly sure it's something like that.
Paul
|
|
|
|
|
OK before I attempt it, a few questions, OK? MMkay!
1. I mark each area with a DIV tag and give an ID.
2. I make a function that inserts code into the DIV (like you have above)
3. I call the function from an onclick passing the DIV tag ID as param.
Does that sound correct?
Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
Yeah, sounds about right. If you're passing that as a parameter, you probably need to use document.formName.elements[divName].innerHTML or something like that.
(If you get into trouble, I'll actually bother to get the DHTML book out instead of continuing to try this from memory )
P
Paul
|
|
|
|
|
<small><b>Paul Riley wrote:</b></small>
<i>If you're passing that as a parameter, you probably need to use document.formName.elements[divName].innerHTML or something like that.</i>
Not necesary I just pass the DIV's ID.
OK but I have a problem Dont know if this has to do with the table tags.
<pre>function MakeReply(elm)
{
elm.style.display = "";
var TABLESTART = "<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\" class=\"Reply\"><tr>";
var FORMSTART = "<form name=\"ReplyForm\" id=\"ReplyForm\" method=post><td>";
var TEXTAREA = "<textarea rows=\"20\" name=\"TextBox1\" id=\"TextBox1\" class=\"ReplyText\"></textarea>";
var FORMEND = "</td></form></tr><tr>";
var SEND = "<td class=\"PostFooter\"><span class=\"Fakelink\" onclick=\"\" onmouseover=\"LinkOn(this)\" onmouseout=\"LinkOff(this)\">Send</span>";
var QUOTE = "<span class=\"Fakelink\" onclick=\"\" onmouseover=\"LinkOn(this)\" onmouseout=\"LinkOff(this)\">Quote</span>";
var CLEAR = "<span class=\"Fakelink\" onclick=\"ClearText(\"TextBox1\")\" onmouseover=\"LinkOn(this)\" onmouseout=\"LinkOff(this)\">Clear</span>";
var TABLEEND = "</td></tr></table>";
var alltext = TABLESTART + FORMSTART + TEXTAREA + FORMEND + SEND + QUOTE + CLEAR + TABLEEND;
alert(alltext);
//alltext = "SOME DUMB TEXT";
elm.innerHTML = alltext;
return false;
}</pre>
[edit] turned off html in this box [edit]
Now the text that I have looks OK in alert box, I just get unknown runtime error in IE. If I uncomment 3rd last line, that text is displayed. Some how there is something wrong... Please help Dr Riley
<i>Give them a chance! Do it for the kittens, dear God, the kittens!</i>
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
Off the top of my head, I wonder if it can't handle adding a form like that. Try putting the form around the empty div.
It would help if I knew what the runtime error was though.
Paul
|
|
|
|
|
Paul Riley wrote:
Off the top of my head, I wonder if it can't handle adding a form like that. Try putting the form around the empty div.
Your analysis is correct Dr. Riley Works now, although IE says syntax error.. It works like it should.
Paul Riley wrote:
It would help if I knew what the runtime error was though.
The error was: unknown runtime error
Have a look at http://closmalverne.co.za/test.htm[^]
. Thats a static dump of what gets generated so far, no links work, reply and send button has only has visual effects. Problem when I click Reply.
What do think so far? I still need to do alot of trimming on the ASP.NET generated controls. I also notice that sometimes those "borrowed" gif's dont load, although, rite click, show picture brings them up, any suggestions?
Cheers
Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
leppie wrote:
The error was: unknown runtime error
I stand corrected, it wouldn't have helped
leppie wrote:
What do think so far?
Very nice! Good to see what I'm working on
Paul
|
|
|
|
|
Paul Riley wrote:
Very nice! Good to see what I'm working on
Feel like doing a back end as well?
At least the design bit is almost done, just a few more scripts, especially the threadtracking function(TM) , basically I want when you click a "child" post, all the "parent" posts are displayed as well, so the thread context can be followed by the reader with more ease.
Now comes the "fun" part putting some friggin logic in place. I have never done a messageboard and although i have ideas, there some big holes in my original plan...
O yes, that syntax error I get is on this line:
elm.innerHTML = TABLESTART + TEXTAREA + FORMEND + SEND + QUOTE + CLEAR + TABLEEND;
or when I assign all those to a var and assign the var , I get they syntax error too. I cant find anything wrong...does the problem lie in one of those other var's?
Give them a chance! Do it for the kittens, dear God, the kittens!
As seen on MS File Transfer: Please enter an integer between 1 and 2.
|
|
|
|
|
leppie wrote:
Feel like doing a back end as well?
Hey, I'm here, I'll help out where I can.
leppie wrote:
I have never done a messageboard and although i have ideas, there some big holes in my original plan...
Do you want me to give you a really cool idea that I've only ever seen once in a message board? (which sadly was hosted by an ISP that shut down this year after a denial of service attack)
leppie wrote:
O yes, that syntax error I get is on this line:
elm.innerHTML = TABLESTART + TEXTAREA + FORMEND + SEND + QUOTE + CLEAR + TABLEEND;
I didn't get a syntax error! I thought you must have fixed it. What do you do to make it happen?
Paul
|
|
|
|
|
Paul Riley wrote:
Do you want me to give you a really cool idea that I've only ever seen once in a message board?
SUre Shoot!
Paul Riley wrote:
I didn't get a syntax error! I thought you must have fixed it. What do you do to make it happen?
When you click [reply] to open the reply textarea . It doesnt happen on the [Send] "button" though....
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
leppie wrote:
SUre Shoot!
Okay, this message board had a three way interface: email, newsfeed, webboard.
When it sent out an email (with the full text included), you could reply to that message and it would add the reply to the webboard. How did it thread them? Well, the message number that was being replied to was part of the reply-to address.
Everything on the webboard was replicated on the newsfeed and everything added to the newsfeed was mirrored on the webboard.
So you could either go to the webboard all the time, or you could sign up to sections that were of interest and then do the whole thing through email, or you could use a standard newsreader to operate the whole webboard.
Very cool. If you could pull that off (and I don't think it would be as hard as it sounds) somewhere down the line... THEN I'll be impressed
leppie wrote:
When you click [reply] to open the reply textarea .
Just tried again to be sure and I'm still not getting an error . Works fine for me.
Paul
|
|
|
|
|
Paul Riley wrote:
Very cool. If you could pull that off (and I don't think it would be as hard as it sounds) somewhere down the line... THEN I'll be impressed
Cool idea, but that will require learning some of how .NET integrates with IIS SMTP on receiving mail...I have an old ASP book (unread of course) nearby, I'll have a look some time, I noted something in there when I scanned it. After that it should be a breeze
Just one problem though, who is gonna pay for all the STMP bandwidth?
Paul Riley wrote:
Just tried again to be sure and I'm still not getting an error . Works fine for me.
OK, I'm using IE 6 on WinXP Pro. I tried it off site too, though it mite be something to do with IIS. Still have that problem.
Syntax error, Line 2 Char 1 Code 0 when I click reply and the innerHTML assignment takes place....
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
leppie wrote:
Cool idea, but that will require learning some of how .NET integrates with IIS SMTP on receiving mail
Of course. Like you, I'm pretty sure it can be done, just not how exactly. This is all a little ways down the line though.
leppie wrote:
Just one problem though, who is gonna pay for all the STMP bandwidth?
I have a pretty good idea as to someone who would gladly host it for testing purposes (and provide news server space) in return for later usage (for a non-profit organisation). If you ever get that far, give me a shout.
leppie wrote:
OK, I'm using IE 6 on WinXP Pro.
So am I. How very bizarre is that?
I'm looking for a problem but I just don't see it.
Paul
|
|
|
|
|
Paul Riley wrote:
I have a pretty good idea as to someone who would gladly host it for testing purposes (and provide news server space) in return for later usage (for a non-profit organisation). If you ever get that far, give me a shout.
That could nice , thanx It will take sometime though still. Does it have ASP.NET /SQL? Infact, I actually have a server to host on, but I'm busy with a site needing to go on that! I'll see once I get a working local model...
Weird error that, syntax error, I'm sure it has to do with all the crap I'm pumping in there
CHeers
PS: I feel sorry for the poor 800 x 600 crowd If we continue this thread any longer they wont be able to follow it.
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
|
|
|
|
|
leppie wrote:
That could nice , thanx It will take sometime though still.
Absolutely. I was considering trying to patch the free MS .NET Forum to do it but I'm at least 4 months away from having time to do that.
leppie wrote:
Does it have ASP.NET /SQL?
ASP.NET and ODBC to Access 2000... MSDE is a possibility we haven't really examined yet. Anything that costs is out.
leppie wrote:
Weird error that, syntax error,
I've looked and looked til my head hurts, I'm just not seeing it.
leppie wrote:
PS: I feel sorry for the poor 800 x 600 crowd If we continue this thread any longer they wont be able to follow it.
Serves 'em right
But seriously, maybe you need a new thread on this Syntax error, see if anyone else can spot it. I doubt many people are watching us here any more, except true saddos like me and Paul W.
Paul
|
|
|
|
|