Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Script:Sticky Note script

  1. #1
    Join Date
    May 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Script:Sticky Note script

    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.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    These two lines control the positioning:

    Code:
    objref.style.left=docwidth/2-objwidth/2+"px"
    objref.style.top=scroll_top+docheight/2-objheight/2+"px"
    change them to:
    Code:
    objref.style.left=docwidth-objwidth+"px"
    objref.style.top=scroll_top+"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.top=scroll_top+docheight/2-objheight/2+"px"
    to:
    Code:
    objref.style.top=scroll_top+"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.left=docwidth-objwidth-10+"px"
    objref.style.top=scroll_top+10+"px"
    and:
    Code:
    objref.style.top=scroll_top+10+"px"
    respectively. The number 10 can be changed for a larger or smaller offset.
    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

  3. #3
    Join Date
    May 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you so much!! Works great.

  4. #4
    Join Date
    May 2005
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Sticky Note Script

    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

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by fmv503
    getting an error message - "docwidth is undefined"
    That means the script is not working for some reason as, installed properly, docwidth is defined.
    Quote Originally Posted by fmv503
    I entered the corrected code
    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.

    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

  6. #6
    Join Date
    May 2005
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sticky Note Script

    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

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    To move it to the left of center, assuming you are now using the original code:
    Code:
    objref.style.left=docwidth/2-objwidth/2+"px"
    this should do it:
    Code:
    objref.style.left=(docwidth/2-objwidth/2)-50+"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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    May 2005
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sticky Script

    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="filterrogidXImageTransform.Microsoft.RandomDissolve(duration=1) progidXImageTransform.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

  9. #9
    Join Date
    May 2005
    Posts
    42
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Sticky Note

    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

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •