...

View Full Version : Is it possible for me the change this script so that the output isn't in a TEXTBOX?



KELS!
06-11-2007, 08:35 PM
Is it possible for me the change this script so that the output isn't in a textbox?

This is the premade script: http://www.javascriptkit.com/script/script2/eventscalendar.shtml

This is the URL where I've customized/edited it:
http://trinityboyceville.headturningdesigns.com/

I'd like to not be forced to output the code in a textbox. Is there anyway I can use a div instead? From what I know it's not possible because then there would be no form to assign the process code to?

Am I at all on the right track?

glenngv
06-11-2007, 10:50 PM
Change the textarea to div. Change the size accordingly.

<div id="eventlist" style="overflow:auto; width: 50px; height: 40px;">
</div>
And then change all instances of:

document.forms.eventform.eventlist.value = whatever;
to:

document.getElementById("eventlist").innerHTML = whatever;
and also all instances of '\n' in the event list to '<br />'.

rnd me
06-12-2007, 12:33 AM
i think the easy way to do this would be to keep the text area tag.
that way, you don't have to recode a bunch of stuff, possibly with unforeseen consequences.

what??!? i wanted a div you say.
simple:
1 add display=none to textarea's tag.
2 posistion+ style your div, and give it the id "eventlistdiv"
3. since "showevents" never returns, add this line to that function right before the last "}" :
document.forms.eventform.eventlistdiv.innerHTML=document.forms.eventform.eventlist.value


i tried this on your example page and it works fine.

KELS!
06-12-2007, 04:56 AM
Change the textarea to div. Change the size accordingly.

<div id="eventlist" style="overflow:auto; width: 50px; height: 40px;">
</div>
And then change all instances of:

document.forms.eventform.eventlist.value = whatever;
to:

document.getElementById("eventlist").innerHTML = whatever;
and also all instances of '\n' in the event list to '<br />'.

Thanks so much! That worked wonderfully!

Now, because you obviously know a lot more about this than I do, would you possibly see if you know of any answer to my next question?

Here goes:
I'd like to be able to have two events scheduled for the same day. However, when I add two events for the same day the script does what it's supposed to.... not what I want it to. Lol.

Is there anyway that I can change it so that it only outputs the "Events of..." ONCE no matter how many events are scheduled for the day?

There is an example of what I DON'T want to happen, on June 1st on the same calendar on that test site. (http://trinityboyceville.headturningdesigns.com/)

Thanks again for all the help already- good luck with this one XD (that is, if you'd like to help me out again, I realize you've already spent a lot of your time on me... haha)
-Kelsie



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum