Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Oct 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts

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

    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/...calendar.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?

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,960
    Thanks
    0
    Thanked 236 Times in 233 Posts
    Change the textarea to div. Change the size accordingly.
    Code:
    <div id="eventlist" style="overflow:auto; width: 50px; height: 40px;">
    </div>
    And then change all instances of:
    Code:
    document.forms.eventform.eventlist.value = whatever;
    to:
    Code:
    document.getElementById("eventlist").innerHTML = whatever;
    and also all instances of '\n' in the event list to '<br />'.

  • #3
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,184
    Thanks
    10
    Thanked 569 Times in 550 Posts
    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.

  • #4
    New Coder
    Join Date
    Oct 2006
    Posts
    46
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by glenngv View Post
    Change the textarea to div. Change the size accordingly.
    Code:
    <div id="eventlist" style="overflow:auto; width: 50px; height: 40px;">
    </div>
    And then change all instances of:
    Code:
    document.forms.eventform.eventlist.value = whatever;
    to:
    Code:
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •