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 7 of 7

Thread: no help???

  1. #1
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy no help???

    i need some help i saw a script for depending on what day of the month a diffrent message is displayed. But i need a script that dependiong on what day of the month a seperate window comes up. It also needs to have the option to open a window if there is no information for that day of the month. i have attached the script for displaying a messge dependin on days but i need the changes made please help asap.
    here it is so far help me:

    <form name="dailyinfo"><table border="0" cellspacing="3" cellpadding="0">
    <tr>
    <td width="100%"><strong>Daily site news</strong><br>
    <textarea rows="5" name="dailycontent" cols="40" wrap="virtual"></textarea></td>
    </tr>
    <tr>
    <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <td width="50%"><a href="java script:moreinfo()">More Information</a></td>
    <td width="50%"><div align="right"><p><input type="text" name="cdate" size="9"></td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td>
    <p align="center"><font face="arial" size="-2">This free script provided by <a href="http://javascriptkit.com">JavaScript
    Kit</a></font></p>
    </td>
    </tr>
    </table>
    </form>


    <script>
    <!--

    /*
    Daily information feed script
    By JavaScript Kit (http://javascriptkit.com)
    Over 400+ free scripts here!
    */

    var dailyinfo=new Array()
    var dailyinfolink=new Array()

    //define the messages below, where the first one is for the 1st of this month, second is for the 2nd of this month, and so on. You do NOT have to define all of them at once. For example, you can just define enough to cover up to a week.

    dailyinfo[1]=''
    dailyinfo[2]=''
    dailyinfo[3]=''
    dailyinfo[4]=''
    dailyinfo[5]=''
    dailyinfo[6]=''
    dailyinfo[7]=''
    dailyinfo[8]=''
    dailyinfo[9]=''
    dailyinfo[10]=''
    dailyinfo[11]=''
    dailyinfo[12]=''
    dailyinfo[13]=''
    dailyinfo[14]=''
    dailyinfo[15]=''
    dailyinfo[16]=''
    dailyinfo[17]=''
    dailyinfo[18]=''
    dailyinfo[19]=''
    dailyinfo[20]=''
    dailyinfo[21]=''
    dailyinfo[22]=''
    dailyinfo[23]=''
    dailyinfo[24]=''
    dailyinfo[25]=''
    dailyinfo[26]=''
    dailyinfo[27]=''
    dailyinfo[28]='Message for the 28th of this month goes here'
    dailyinfo[29]='Message for the 29th of this month goes here'
    dailyinfo[30]='Message for the 30th of this month goes here'
    dailyinfo[31]=''

    //if any one of the daily messages above should click through to a URL, specify them here:
    dailyinfolink[28]="http://dynamicdrive.com"
    dailyinfolink[29]="http://news.com"

    var mydate=new Date()
    var year=mydate.getYear()
    if (year < 1000)
    year+=1900
    var day=mydate.getDay()
    var month=mydate.getMonth()+1
    if (month<10)
    month="0"+month
    var daym=mydate.getDate()

    document.dailyinfo.cdate.value=month+"/"+daym+"/"+year
    document.dailyinfo.dailycontent.value=dailyinfo[daym]

    function moreinfo(){
    if (dailyinfolink[daym])
    window.location=dailyinfolink[daym]
    else
    alert("No additional information available for this news piece")
    }

    //-->
    </script>

  • #2
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    no one has any idea?

  • #3
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    This forum is comprised solely of volunteers, you cannot expect answers within an hour of posting (despite that being quite common).

    Patience is a virtue .

  • #4
    New Coder
    Join Date
    Jun 2002
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts
    jkd...
    About your sig. I wouldn't call your summer a complete waste. With your 500+ posts, that helps out a lot of people!

  • #5
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by jscript_junkie
    jkd...
    About your sig. I wouldn't call your summer a complete waste. With your 500+ posts, that helps out a lot of people!
    Thanks for the vote of confidence, but I would have much preferred to find a paying job. Oh well, this can further be discussed in pm's if you want, let's keep this on topic.

  • #6
    New to the CF scene
    Join Date
    Aug 2002
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy

    any body have any idea how to help me with this??

  • #7
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,316
    Thanks
    203
    Thanked 2,566 Times in 2,544 Posts
    As as already been hinted, you would find it a good idea to have a look at "How to post a JavaScript question". You seem to have broken most of the rules laid down there.


  •  

    Posting Permissions

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