Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-14-2007, 06:10 PM   PM User | #1
jodykaye
New to the CF scene

 
Join Date: Sep 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
jodykaye is an unknown quantity at this point
Need scrollbars in EI7 / pop up interval timing off

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!
jodykaye is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:00 AM.


Advertisement
Log in to turn off these ads.