Peeling corner on exit

by 10 replies
12
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???
#programming #corner #exit #peeling
  • 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
    • [1] reply
  • 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
  • Nope, didn't work...
  • 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
  • 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...
  • 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...
  • 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...
  • 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
    • [1] reply
    • Here you go:

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


Next Topics on Trending Feed

  • 12

    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???