http://www.dynamicdrive.com/dynamici...stickynote.htm
This script is perfect......but--is it possible to position the note in the upper right corner of the screen instead of the middle?
Thanks....![]()
http://www.dynamicdrive.com/dynamici...stickynote.htm
This script is perfect......but--is it possible to position the note in the upper right corner of the screen instead of the middle?
Thanks....![]()
Last edited by ddadmin; 05-16-2005 at 08:30 PM.
These two lines control the positioning:
change them to:Code:objref.style.left=docwidth/2-objwidth/2+"px" objref.style.top=scroll_top+docheight/2-objheight/2+"px"You will also want to change the static positioning line (which appears later in the code and looks like the initial top positioning line but without a left positioning line with it):Code:objref.style.left=docwidth-objwidth+"px" objref.style.top=scroll_top+"px"to:Code:objref.style.top=scroll_top+docheight/2-objheight/2+"px"That will put the thing in the exact upper right corner but, you might want to introduce a slight offset, like so:Code:objref.style.top=scroll_top+"px"and:Code:objref.style.left=docwidth-objwidth-10+"px" objref.style.top=scroll_top+10+"px"respectively. The number 10 can be changed for a larger or smaller offset.Code:objref.style.top=scroll_top+10+"px"
Last edited by jscheuer1; 05-16-2005 at 07:48 PM.
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Thank you so much!! Works great.![]()
http://www.dynamicdrive.com/dynamic.../stickynote.htm
Wow! What an awesome site!
I am attempting to insert the Sticky Note in FP 2000 and am getting an error message - "docwidth is undefined"
Just like the original poster - I need to get the note over to the left some. I entered the corrected code that was given in this post and the following:
objref.style.left=docwidth-objwidth-10+"px"
objref.style.top=scroll_top+10+"px"
Thanks for any help provided.
fmv
That means the script is not working for some reason as, installed properly, docwidth is defined.Originally Posted by fmv503
Just to be clear, there was nothing wrong with the code to begin with. It simply positions the note in the center of the page, if you want it elsewhere, then the code needs to be changed, not corrected.Originally Posted by fmv503
Anyways, were you getting the error before you tried changing the code or after?
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Hi and thank you for your help -
I meant to say revised instead of corrected!![]()
I have been working on this today and found where I made my initial error in revising it. I have it working just as it is written, without any revision EXCEPT I have inserted my html, deleted the Dynamic Drive box, to see where/how my box would be positioned. Since I am using FP 2000, I have it in the same directory as all the other htmls.
This is what I have between the DIVs (I copied and pasted). There is no reference to the link DD that is in the code:
<DIV id="fadeinbox" (For purposes of posting I removed this - it is still in tact in FP)
INSERT ANY HTML TO DISPLAY HERE. DO NOT REMOVE OUTER MOST DIV.<br>
Script © <a href="fade-box.html"></a><br>
<div align="left"> <a href="#" onClick="hidefadebox();return false">Hide Box</a>
</div>
</DIV>
I am so hoping I can get this right as it would make such a nice addition to the website I am working. Any help is greatly appreciated.
I have attached a screen shot to show what I am seeing.
http://www.ados.com/~vanover/sticky-fmv.jpg
I am hoping to move it over to the left some - for some reason, even with the Z-index it is partially going behind the table on the right. Someone else designed it so...I hope that I have provided enough information.
I have uploaded the html, should you care/need to see it.
Once again - thank you!
Frieda
To move it to the left of center, assuming you are now using the original code:this should do it:Code:objref.style.left=docwidth/2-objwidth/2+"px"to move it 50px to the left, adjust the number 50 to suit. Probably the z-index on the table is equal to or greater than the box and is parsed later by the browser. If that doesn't do it for you and you would like it to display over that table yes, I would need the address to check things out.Code:objref.style.left=(docwidth/2-objwidth/2)-50+"px"
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Hi John -
My computer died last week so I couldn't let you know that even though I have inserted my http: address, I am still getting the box that Dynamic drive links to.
This is what I have: (Copy and pasting inserted the smilies - sorry - the code is correct)
<DIV id="fadeinbox" style="filterrogid
XImageTransform.Microsoft.RandomDissolve(duration=1) progid
XImageTransform.Microsoft.Shadow(color=gray,direction=135) ; -moz-opacity:0">
INSERT ANY HTML TO DISPLAY HERE. DO NOT REMOVE OUTER MOST DIV.<br>
Script © <a href="http://www.ados.com/~vanover/fade-box.html">Dynamic Drive</a><br>
<div align="right"> <a href="#" onClick="hidefadebox();return false">Hide Box</a>
</div>
</DIV>
Everything seems to be working except for that.
Thank you so much for all your help!
Frieda
I thought it might be helpful if I posted a screen shot of what I have. I am having NO troube with the scrit in the Head section.
My Link
Image that keeps coming up
Picture of my HTML Page
It seems like this should be straight-forward but somehow I must be missing something! I have tried various things, including looking at some other webs that have included this...still no luck.
Thank you.
Frieda
Try:
HTML Code:<DIV id="fadeinbox" style="filter:progid:DXImageTransform.Microsoft.RandomDissolve(duration=1) progid:DXImageTransform.Microsoft.Shadow(color=gray,direction=135) ; -moz-opacity:0"> <img src="http://www.ados.com/~vanover/fade-box.html"> <div align="right"> <a href="#" onClick="hidefadebox();return false">Hide Box</a> </div> </DIV>
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Bookmarks