Jump to content


Photo

IR Violation popup


This topic has been archived. This means that you cannot reply to this topic.
3 replies to this topic

#1 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,627 posts

Posted 02 September 2008 - 08:59 AM

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.

<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/

#2 BlackbirdXX

BlackbirdXX

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 11 November 2008 - 11:16 AM

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.

#3 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,627 posts

Posted 11 November 2008 - 02:38 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/

#4 myhousekey

myhousekey

    Newbie

  • Members
  • Pip
  • 8 posts

Posted 14 October 2009 - 02:25 PM

Anyone ever get this to work?