PDA

View Full Version : Sticky Note script Not Working When Uploaded



fmv503
07-08-2008, 04:52 PM
1) Script Title: Sticky Note script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/stickynote.htm

3) Describe problem: The script works on my computer but not when uploaded.

http://www.attinc.com/index-sale2008.htm
http://www.attinc.com/sale-stickynote.js
http://www.attinc.com/images/sale-plxbmr08.gif

I am linked to the .js:

<script type="text/javascript" language="javascript" src="sale-stickynote.js"></script>

This a great and useful script!


Many thanks,
Frieda :confused:

jscheuer1
07-08-2008, 05:48 PM
Your page is in violation of Dynamic Drive's usage terms (http://www.dynamicdrive.com/notice.htm), which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.

You also forgot this part:


<style type="text/css">

#fadeinbox{
position:absolute;
width: 300px;
left: 0;
top: -400px;
border: 2px solid black;
background-color: lightyellow;
padding: 4px;
z-index: 100;
visibility:hidden;
}

</style>

Even with that, though it works (it was working, it was just way too far down the page to see it), it is still a bit far down the page.

fmv503
07-08-2008, 06:08 PM
Thanks, John. I uploaded the wrong page as I was trying to get it to work. My utmost apology. I meant to leave the terms in tact. Will fix that immeditely.

Frieda :D

fmv503
07-08-2008, 06:32 PM
John -

Is this approprite to ensure Terms of use is met?

<!--
/***********************************************
* Sticky Note script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
* Go to http://www.dynamicdrive.com/ for full source code
***********************************************/ -->

<script type="text/javascript" language="javascript" src="sale-stickynote.js"></script>

Thank you,
Frieda :D

jscheuer1
07-08-2008, 06:45 PM
Yes, as long as it appears on all pages using the script. However, this is the more usual method (the language attribute is deprecated, so I've removed it):



<script type="text/javascript" src="sale-stickynote.js">
<!--
/***********************************************
* Sticky Note script- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
* Go to http://www.dynamicdrive.com/ for full source code
***********************************************/
// -->
</script>

I don't know if you noticed, but I edited my previous post to indicate the problem, you left out the style section from the demo page. I also see that you edited the script to make the sticky note appear below the area where your two Flash content areas are. You would not need to do this if you set the wmode for both Flash items to transparent. Having it so low (as you have it now to avoid the Flash) makes it too low on a typical 1024 x 768 resolution browser window.

fmv503
07-08-2008, 06:50 PM
John -

I wanted to let you know that the credits were always and are in the external .js file as indicated in the Terms of Use - I never violated that. I was worried that while working the credits got deleted, but it didn't.

sale-stickynote.js as posted in my first post.

Do I need to include the credits on the index page / page the script is used as well as the external js file? I thought as long as they were in the external .js file (Number 4, Terms of Use) it was correct.

Thanks, John!

Frieda

fmv503
07-08-2008, 06:58 PM
John -

My intent was not to have the note low on the pg. I am moving it up now. When on top of the flash swfs - the note is behind. I am sure it is because of wmode that you mentioned. Where do I set the wmode to transparent? Is that within the script? You are amazing - wish I knew all this!

Frieda

jscheuer1
07-08-2008, 11:39 PM
First off, just a clarification, I'm sure you re probably already in compliance, if not, please remedy it. From the official terms of use (http://www.dynamicdrive.com/notice.htm) (emphasis added):


Users agree not to remove/ edit the credit notice within the DHTML source code, or claim the code to be work of their own. What is the copyright notice? It appears inside the <script> tag of each script, and looks something like this:


/***********************************************
* Dynamic Countdown script- Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

Sometimes you may wish to move the DHTML script to an external .js file. In such instances, the credit notice must still be retained within the SCRIPT tags, in the page's visible source:


<script src="countdown.js" type="text/javascript">
/***********************************************
* Dynamic Countdown script- Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/
</script>

Now, on your example page:

http://www.attinc.com/index-sale2008.htm

You still have not added the style from Step 1 on the DD demo page for this script:


<style type="text/css">

#fadeinbox{
position:absolute;
width: 300px;
left: 0;
top: -400px;
border: 2px solid black;
background-color: lightyellow;
padding: 4px;
z-index: 100;
visibility:hidden;
}

</style>

So the sticky note is still appearing at the bottom of your page.

Once you've added that style back and returned to the original script source code, you can activate transparent wmode for Flash like so:


<script type="text/javascript">
// <![CDATA[
var so = new FlashObject("header-celebrate.swf", "flash1-index", "720", "130", "8", "#4447a4");
so.addParam("wmode", "transparent");
so.setAttribute("wmode", "transparent");
so.write("flash1-index");
// ]]>
</script>

and similar for your other Flash object.