|
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
|
|
|
|
|
Paul Riley wrote:
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.
It wouldnt even get past the installers depency check for me
Paul Riley wrote:
MSDE is a possibility we haven't really examined yet. Anything that costs is out.
Does that require licensing? I'm using that at the moment, Access is not really an option, a bit too limiting for my liking. FOr some reasons I always dig out mysterious ways off doing things, so I need flexability (Hooray .NET).
Paul Riley wrote:
I've looked and looked til my head hurts, I'm just not seeing it.
But you realised that 30 min before you posted this And you still continue further
Get some sleep
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:
It wouldnt even get past the installers depency check for me
No! Really? Well, that could be a problem
leppie wrote:
Does [MSDE] require licensing?
Apparently not. I didn't really know a lot about it until I heard an argument at work about it the other week. We've always used ODBC and allowed the user to choose a database, but that accounts for a good 20% of development and bug fixing time, so the coders want to switch to MSDE because it's a free distributable and we can make sure everyone's using the same thing.
It's not happening yet but I suspect it will eventually.
leppie wrote:
Access is not really an option, a bit too limiting for my liking.
Yeah, Access is fine for what we're doing at the moment but I wouldn't fancy doing a message board (or anything that's going to prduce more than a couple of thousand records) with it.
leppie wrote:
But you realised that 30 min before you posted this
You don't think I'd let that beat me? Once I'm looking at a problem, I don't like to give up. I'd have had trouble sleeping if you hadn't come up with an answer last night
Paul
|
|
|
|
|
I've been telling lies. I do get the syntax error after all, I just hadn't noticed it because I thought I had the dialog warning turned on.
Still haven't figured out what's causing it though
Paul
|
|
|
|
|
Paul Riley wrote:
Still haven't figured out what's causing it though
It was the CLEAR line! I had too many quotes or I was qouting the element not passing it.
It works now, but what a vague error message, that just put me completely off track!
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.
|
|
|
|
|
You jest?
So how did it come to Line 2, Char 1? That's what had me so confused. Daaaaammm!
Paul
|
|
|
|
|
Paul Riley wrote:
So how did it come to Line 2, Char 1? That's what had me so confused. Daaaaammm
I think I have learnt in 3 days not to take JavaScript error messages seriously
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:
What do think so far?
Sorry I was offline doing Real Life Stuff when your question came on, but glad the others could help
I think your example looks really good. I especially love the way you can reply to a post ON THE PAGE instead of having to go to another page.
|
|
|
|
|
Paul Watson wrote:
Sorry I was offline doing Real Life Stuff when your question came on, but glad the others could help
Now that my free GPRS has ended, I only have offpeak times to be online, but they talking about ADSL in the Cape maybe as early as December At least I have 128k ISDN to keep me happy untill then...
Paul Watson wrote:
I think your example looks really good. I especially love the way you can reply to a post ON THE PAGE instead of having to go to another page.
I heard that David Wulff did that too in his forums, but I never looked I thought it would probably be easy enough...maybe I should have a look
Tell me Paul, can I POST data to the server without having to refresh the page? Sort of like a "quick" reply? Seeing that the page is eating up alot of bandwidth for formatting, I'm trying to cut down on extra bandwidth.
Cheers
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.
|
|
|
|
|