•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 361,909 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,497 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 5386 | Replies: 4
![]() |
•
•
Join Date: Mar 2006
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
This script works in ie but NOT Firefox. Can someone help me make it work in both.
Script just creates and rotates the url that it uses. :mad:
<html>
<head>
<title>Corvallis Calendar - Home</title>
<SCRIPT LANGUAGE="JavaScript" type="text/javascript" >
<!-- //
var myDate = new Date();
var myMonth = myDate.getMonth();
myMonth = myMonth + 1;
var prefix = 'cal';
var CalURL = prefix + myMonth + '.html';
function rotate() {
window.location.reload(CalURL);
}
//-->
</SCRIPT>
</head>
<body onLoad="javascript:rotate()">
</body>
</html>
Script just creates and rotates the url that it uses. :mad:
<html>
<head>
<title>Corvallis Calendar - Home</title>
<SCRIPT LANGUAGE="JavaScript" type="text/javascript" >
<!-- //
var myDate = new Date();
var myMonth = myDate.getMonth();
myMonth = myMonth + 1;
var prefix = 'cal';
var CalURL = prefix + myMonth + '.html';
function rotate() {
window.location.reload(CalURL);
}
//-->
</SCRIPT>
</head>
<body onLoad="javascript:rotate()">
</body>
</html>
•
•
Join Date: Jun 2004
Location: H4x0rville
Posts: 2,105
Reputation:
Rep Power: 9
Solved Threads: 18
You know that getMonth() returns a number. What do your URL's look like??
•
•
Join Date: Mar 2006
Posts: 9
Reputation:
Rep Power: 0
Solved Threads: 1
See that window.location.reload() is having problem..............
the definition says that........
relaod() --------- this is ok since you r not using this type.
reload(force) -------- but check out this one. force is the boolean handle.
and this is applicable for FireFox and Netscape......
so that is the reason its not working in FireFox......
Alternative:
use
window.location.replace(url)
this method to achieve your requirement.... i think this will meet your purpose.....
But just check out what replace(url) method does.....
The replace() method of the Location object causes the specified URL to be loaded and displayed, but instead of creating a new entry in the hisory array for that URL, it overwrites the URL of the current entry in the array
if this is fine for you u can use this replace() instead..........
Nilesh............
the definition says that........
relaod() --------- this is ok since you r not using this type.
reload(force) -------- but check out this one. force is the boolean handle.
and this is applicable for FireFox and Netscape......
so that is the reason its not working in FireFox......
Alternative:
use
window.location.replace(url)
this method to achieve your requirement.... i think this will meet your purpose.....
But just check out what replace(url) method does.....
The replace() method of the Location object causes the specified URL to be loaded and displayed, but instead of creating a new entry in the hisory array for that URL, it overwrites the URL of the current entry in the array
if this is fine for you u can use this replace() instead..........
Nilesh............
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
beta bon browser browsers browsing development echo email encryption europe firefox gecko html internet internet explorer internet explorer 7 javascript leak linux memory microsoft mozilla networking news open source open-source patch phishing scams security social software super testing users web webmail
- disable javascript through javascript in firefox (JavaScript / DHTML / AJAX)
- Javascript Firefox Help (JavaScript / DHTML / AJAX)
- Javascript and Firefox ISSUES (JavaScript / DHTML / AJAX)
- javascript NG on Firefox (JavaScript / DHTML / AJAX)
- javascript-firefox issues (JavaScript / DHTML / AJAX)
- Can't view JavaScript on Firefox/IE (Web Browsers)
Other Threads in the JSP Forum
- Previous Thread: plz help me
- Next Thread: Help needed for weblogic/JSP/netui-tag



Linear Mode