Peeling corner on exit

10 replies
Hi all. I have a peeling corner on one of our websites that appears when the user visits the site. What I want it to do is for it to appear upon exit: ie. when the user moves to the back button or to close out the page. Anyone have any ideas???
#corner #exit #peeling
  • Profile picture of the author mywebwork
    Hi Belinda

    Could you tell us what script or plugin you are using to create the "peeling" effect? If I knew perhaps I could figure out how to tie it in to an event when you exit the page.

    All the best...

    Bill
    {{ DiscussionBoard.errors[1304672].message }}
  • Profile picture of the author mywebwork
    Hi Belinda

    I haven't actually tried it but by looking at it I think I see how you could do this:

    1 - Remove or comment out the last line in your peel.js script (line # 64).

    2 - Replace or edit the BODY tag of your index.html or index.php as follows:

    Code:
    <BODY onUnload="jaaspeel.putObjects()">
    I believe that should do the trick - let me know how it works for you (or if it doesn't!).

    Bill
    {{ DiscussionBoard.errors[1305531].message }}
  • Profile picture of the author belgirl
    Nope, didn't work...
    {{ DiscussionBoard.errors[1305688].message }}
  • Profile picture of the author mywebwork
    Hi Belinda

    Does it still run the peeling script when the site loads (it shouldn't with the last line removed)? And are you still including the peel.js script with the document head (not body) using this line:

    Code:
    <script src="peel/peel.js" type="text/javascript"></script>
    Sorry it didn't work for you, if I get a chance later today I'll try a sample myself.

    Bill
    {{ DiscussionBoard.errors[1306316].message }}
  • Profile picture of the author belgirl
    Let me try putting the script source in the head and see if that works. It doesn't load when the page loads, but nothing happens if I go to close out the browser or hit the bck button either...
    {{ DiscussionBoard.errors[1306891].message }}
  • Profile picture of the author belgirl
    Nope, still didn't work... Your help is greatly appreciated though. What I think some people do is put some hidden div or tag in the html that when moused over in an attempt to close out the page brings up the script...
    {{ DiscussionBoard.errors[1307004].message }}
  • Profile picture of the author belgirl
    Well I tried it with onmouseover and a link which loads the peeling corner, but only the peeling corner and not the rest of the page....so close and yet so far...
    {{ DiscussionBoard.errors[1307319].message }}
  • Profile picture of the author mywebwork
    Hi Belinda

    Sorry you are having so much trouble with this.

    Can you show me the format of the link you created? Anything you can activate with an onMouseOver should also be possible to activate with an onUnload event.

    Bill
    {{ DiscussionBoard.errors[1307618].message }}
    • Profile picture of the author belgirl
      Here you go:

      <a href="somedomain.php" onMouseOver="jaaspeel.putObjects()">test</a>


      Originally Posted by mywebwork View Post

      Hi Belinda

      Sorry you are having so much trouble with this.

      Can you show me the format of the link you created? Anything you can activate with an onMouseOver should also be possible to activate with an onUnload event.

      Bill
      {{ DiscussionBoard.errors[1309357].message }}

Trending Topics