<?xml version="1.0" encoding="utf-8" ?>
<gadget>
<name>Experts Exchange Gadget</name> <!-- the name of your gadget -->
<version>1.0</version>
<description>Displays Your EE Badge In a Simple Gadget</description> <!-- the description of your gadget -->
<copyright>© Patsmitty.com</copyright>
<icons>
<icon height="48" width="48" src="logo.png" /> <!-- the reference to your icon if applicable-->
</icons>
<hosts>
<host name="sidebar">
<base type="HTML" apiVersion="1.0.0" src="eeBadge.html" /> <!-- the reference to your HTML file -->
<permissions>Full</permissions>
<platform minPlatformVersion="1.0" />
<defaultImage src="logo.png" />
</host>
</hosts>
</gadget>
A couple of important things to note regarding the XML file:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Unicode" />
<title></title>
<link type="text/css" rel="stylesheet" href="http://www.experts-exchange.com/shared/expertBadgesCss.jsp" />
</head>
<body style="height: 270px; width: 220px;"> <!-- this is the size for the Medium Custom Badge. If you want to show another size of your badge (i.e. small or large) you'll have to modify these dimensions. Small Badge = 350 x 170 (h x w) :: Large Badge = 245 x 320 (h x w) -->
<script type="text/javascript">setInterval(addScript, 1800000); // updates the data every 30 minutes</script>
</body>
</html>
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (8)
Author
Commented:Commented:
I've googled a bit about this function (i'm no expert of javascript). In every sample i've seen, they always add "()" at the end of the function name. Like this:
setInterval(addScript(), 900000);
Is it the problem? I've modified it to see if it make a difference...
Author
Commented:Commented:
Open in new window
Commented:
I believe that the problem can be fixed by repositioning part of the HTML. I removed line 8 and added this below the EE-generated script:
Open in new window
(right above the </body> tag) Change the interval back to 180000 later.It appears that the EE code expects to manipulate a particular script block, based on its ordinal position within the HTML.
Note: I'm also seeing an odd white border around the gadget rather than the expected gradient fill. It might be related to my OS and IE version (Win7, IE 8)
-- Dan
View More