...

View Full Version : no help???



mott85
08-08-2002, 06:11 PM
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>

mott85
08-08-2002, 07:28 PM
no one has any idea?

jkd
08-08-2002, 07:37 PM
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 ;).

jscript_junkie
08-08-2002, 07:44 PM
jkd...
About your sig. I wouldn't call your summer a complete waste. With your 500+ posts, that helps out a lot of people! :D :thumbsup:

jkd
08-08-2002, 10:21 PM
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! :D :thumbsup:

Thanks for the vote of confidence, but I would have much preferred to find a paying job. :D Oh well, this can further be discussed in pm's if you want, let's keep this on topic. :)

mott85
08-10-2002, 05:50 PM
any body have any idea how to help me with this??:confused:

Philip M
08-10-2002, 06:02 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum