jodykaye
09-14-2007, 06:10 PM
I’m working on a kiosk project for IE7 that has several different types of pop-up’s that must stay a fixed size.
The first problem is that IE will NOT show the scrollbars that are needed to review the full pop-up.
Here’s and example of a line:
<script type="text/javascript">
function openWinMenuUrl()
{
NewWindow=window.open
('http://www.aol.com', 'menu_url',
'width=1000,height=600,location=yes,menubar=no,resizable=no,scrolling=yes');
}
</script>
The second problem is that my pop-up timer (respectfully snagged from javascript kit) will not pop-up at the timed interval –only onload, and when you click either of the 2 buttons in the pop-up it performs no action.
<script type="text/javascript">
//JK Popup Window Script (version 3.0)- By JavaScript Kit (http://www.javascriptkit.com)
//Visit JavaScriptKit.com for free JavaScripts
//This notice must stay intact for legal use
//Win Type: Pop Up | 5 minutes period
//Specify URLs to randomly select from and popup/popunder:
//To display a single URL, just remove all but the first entry below:
var popurls=new Array()
popurls[0]="return3.html"
function openpopup(popurl){
var winpops=window.open(popurl,"","width=290,height=200")
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
popfrequency="5 minutes"
function resetcookie(){
var expireDate = new Date()
expireDate.setMinutes(expireDate.getMinutes()-10)
document.cookie = "jkpopunder=;path=/;expires=" + expireDate.toGMTString()
}
function loadornot(){
if (get_cookie('jkpopunder')==''){
openpopup(popurls[Math.floor(Math.random()*(popurls.length))])
var expireDate = new Date()
expireDate.setMinutes(expireDate.getMinutes()+parseInt(popfrequency))
document.cookie = "jkpopunder="+parseInt(popfrequency)+";path=/;expires=" + expireDate.toGMTString()
}
}
if (get_cookie('jkpopunder')!=parseInt(popfrequency))
resetcookie()
loadornot()
</script>
As a side note, the whole project works in Safari, except I get the same onload issue with the timer.
Any ideas or alternative suggestions are appreciated. Thanks!
The first problem is that IE will NOT show the scrollbars that are needed to review the full pop-up.
Here’s and example of a line:
<script type="text/javascript">
function openWinMenuUrl()
{
NewWindow=window.open
('http://www.aol.com', 'menu_url',
'width=1000,height=600,location=yes,menubar=no,resizable=no,scrolling=yes');
}
</script>
The second problem is that my pop-up timer (respectfully snagged from javascript kit) will not pop-up at the timed interval –only onload, and when you click either of the 2 buttons in the pop-up it performs no action.
<script type="text/javascript">
//JK Popup Window Script (version 3.0)- By JavaScript Kit (http://www.javascriptkit.com)
//Visit JavaScriptKit.com for free JavaScripts
//This notice must stay intact for legal use
//Win Type: Pop Up | 5 minutes period
//Specify URLs to randomly select from and popup/popunder:
//To display a single URL, just remove all but the first entry below:
var popurls=new Array()
popurls[0]="return3.html"
function openpopup(popurl){
var winpops=window.open(popurl,"","width=290,height=200")
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
popfrequency="5 minutes"
function resetcookie(){
var expireDate = new Date()
expireDate.setMinutes(expireDate.getMinutes()-10)
document.cookie = "jkpopunder=;path=/;expires=" + expireDate.toGMTString()
}
function loadornot(){
if (get_cookie('jkpopunder')==''){
openpopup(popurls[Math.floor(Math.random()*(popurls.length))])
var expireDate = new Date()
expireDate.setMinutes(expireDate.getMinutes()+parseInt(popfrequency))
document.cookie = "jkpopunder="+parseInt(popfrequency)+";path=/;expires=" + expireDate.toGMTString()
}
}
if (get_cookie('jkpopunder')!=parseInt(popfrequency))
resetcookie()
loadornot()
</script>
As a side note, the whole project works in Safari, except I get the same onload issue with the timer.
Any ideas or alternative suggestions are appreciated. Thanks!