Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> IR Violation popup, For 2008
habman
post Sep 2 2008, 08:59 AM
Post #1


Veteran
***

Group: Members
Posts: 1948
Joined: 29-August 05
From: Leamington ON, Canada
Member No.: 3058

2009 MFL: 31589 , 24836


I have reworked my IR violation popup so that it should now work only once per browser session.

This script will:

- Alert owners of a possible IR violation they have on their roster
- Alert commissioners of possible IR violations in their league

I have tested it in IE and Firefox. In IE it works without any problems in Firefox it seems to work only when the code is near the top of the page(haven't figured out why yet).

In order to implement this app simply copy and paste the following code into a Home Page Module then add the home page module to your list of home page modules to display.

Hint: You can add this code to any home page module even one that is currently in use. Just try to add it to one that comes at or near the top of your home page modules being displayed.

CODE
<script language="JavaScript" type="text/javascript">
<!--

if (franchise_id==undefined) { // Check to see if user is not logged in
  var franchise_id;
} else {

var IRPopupCookie = "IRPopupCookie_" + league_id + "_" + franchise_id;

if (document.cookie.length > 0) {
  if (document.cookie.indexOf(IRPopupCookie + "=popped;") == -1) { // Then cookie does not exist so create cookie and load iframe
    document.write('<iframe src="http://www.habman.com/mfl/apps/IRPopup.php?leagueid=%LEAGUEID%&amp;year=%YEAR%&amp;host=%HOST%&amp;franchise_id=' + franchise_id + '" scrolling="no" height="0" width="0" frameborder="0"></iframe>');
    document.cookie=IRPopupCookie+"=popped;";
  }
}
}

// -->
</script>


--------------------
My MFL scripts . . . . . . . . http://www.habman.com/mfl/
Go to the top of the page
 
+Quote Post
BlackbirdXX
post Nov 11 2008, 11:16 AM
Post #2


Newbie
*

Group: Members
Posts: 1
Joined: 24-September 08
Member No.: 7271



I can't seem to get this popup to work. Has anyone else had any problems. I have followed the instructions and have / am using a couple other Habman apps (Great work, by the way!) without any problems.

Just checking to see if it is "user error" or if there might be a problem with the app.

Thanks.
Go to the top of the page
 
+Quote Post
habman
post Nov 11 2008, 02:38 PM
Post #3


Veteran
***

Group: Members
Posts: 1948
Joined: 29-August 05
From: Leamington ON, Canada
Member No.: 3058

2009 MFL: 31589 , 24836


QUOTE (BlackbirdXX @ Nov 11 2008, 12:16 PM) *
I can't seem to get this popup to work. Has anyone else had any problems. I have followed the instructions and have / am using a couple other Habman apps (Great work, by the way!) without any problems.

Just checking to see if it is "user error" or if there might be a problem with the app.

Thanks.



This one has been kind of hit and miss as it seems dependant on the users PC settings and how it is set to handle cookies.

I currently have a request into MFL to add a javascript var which, if added, will help create a javascript popup which will help create a much better popup script.


--------------------
My MFL scripts . . . . . . . . http://www.habman.com/mfl/
Go to the top of the page
 
+Quote Post
myhousekey
post Oct 14 2009, 02:25 PM
Post #4


Newbie
*

Group: Members
Posts: 8
Joined: 5-September 08
Member No.: 7107



Anyone ever get this to work?
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 3rd September 2010 - 11:39 PM