mariapa
10-03-2011, 03:02 PM
I am completely a beginner at coding and really do not know much right now.
This is the day of week link rotation script which works just great:
<script type="text/javascript">
<!--
var MyEveryDayLinks = [
['Sunday', 'http://www.google.com', 'Google'],
['Monday', 'myURL', 'LinkName'],
['Tuesday', 'myURL', 'LinkName'],
['Wednesday', 'myURL', 'LinkName'],
['Thursday', 'myURL', 'LinkName'],
['Friday', 'myURL', 'LinkName'],
['Saturday', 'myURL', 'LinkName']
];
var today = new Date();
var L = today.getDay();
document.write('Today is ' + MyEveryDayLinks[L][0] + '. My daily
URLs: <a href="' + MyEveryDayLinks[L][1] + '">' +
MyEveryDayLinks[L][2] + '<\/a>.') ;
// -->
</script>
Unfortunately I can't open urls in a new window.
I would so like this to work...but don't know why i can't make it work.
I've tried something like this with no luck...any ideas?:
<a href="javascript:[window.open(' + MyEveryDayLinks[L][1] + ', 'height=200, width=200',)];">' + MyEveryDayLinks[L][2] + '<\/a>.') ;
This is the day of week link rotation script which works just great:
<script type="text/javascript">
<!--
var MyEveryDayLinks = [
['Sunday', 'http://www.google.com', 'Google'],
['Monday', 'myURL', 'LinkName'],
['Tuesday', 'myURL', 'LinkName'],
['Wednesday', 'myURL', 'LinkName'],
['Thursday', 'myURL', 'LinkName'],
['Friday', 'myURL', 'LinkName'],
['Saturday', 'myURL', 'LinkName']
];
var today = new Date();
var L = today.getDay();
document.write('Today is ' + MyEveryDayLinks[L][0] + '. My daily
URLs: <a href="' + MyEveryDayLinks[L][1] + '">' +
MyEveryDayLinks[L][2] + '<\/a>.') ;
// -->
</script>
Unfortunately I can't open urls in a new window.
I would so like this to work...but don't know why i can't make it work.
I've tried something like this with no luck...any ideas?:
<a href="javascript:[window.open(' + MyEveryDayLinks[L][1] + ', 'height=200, width=200',)];">' + MyEveryDayLinks[L][2] + '<\/a>.') ;