Current location: Hot Scripts Forums » General Web Coding » JavaScript » Need peeling corner on exit


Need peeling corner on exit

Reply
  #11 (permalink)  
Old 11-05-09, 11:50 AM
wirehopper's Avatar
wirehopper wirehopper is offline
-
 
Join Date: Feb 2006
Posts: 2,516
Thanks: 20
Thanked 109 Times in 106 Posts
Quote:
Lastly "onUnload" isn't working with this particular script and nor is the script you provided. If you are able to further provide insight, that's fine. Otherwise perhaps someone else who has programming knowledge can help.
End User has excellent 'programming knowledge'.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #12 (permalink)  
Old 11-05-09, 01:08 PM
End User's Avatar
End User End User is offline
Level II Curmudgeon
 
Join Date: Dec 2004
Posts: 3,027
Thanks: 14
Thanked 35 Times in 33 Posts
Quote:
Originally Posted by belgirl View Post
First of all, to say "Here's a tutorial and code for creating the "corner peel" effect: http://www.marcofolio.net/webdesign/...r_website.html" is not reading my original post as I already referenced this page AND the actual code in my first post. To state that is repetitive and unnecessary.
I pointed you to the other corner peel code as an alternative, in case it would be easier for you to understand or implement. I apologize for suggesting alternate resources or code.


Quote:
Originally Posted by belgirl View Post
Secondly my original post states "ATTEMPT to hit the back button or close out the site." Not hover. My example of trafficgenerator.com shows this example.
There isn't anything that will prevent them from "attempting" to hit the Back button. If they do hit the Back button, onUnload() is likely to be all you can use. If onUnload() doesn't work with your script or page, that's another issue.



Quote:
Originally Posted by belgirl View Post
Thirdly, to state "It would be pretty easy to write your own:" is also an unnecessary comment. If it were easy or if I knew how to do it, I wouldn't be asking the question on the forum.
I'm not familiar with your level of expertise, so I can't tell how exactly much help you need. We're glad to help (or try to, in any case). We can provide examples and bits of code but generally we don't write complete scripts for people. If someone here is willing to do that for you, that's great, but typically it's going to be up to you to do at least some of the coding.


Quote:
Originally Posted by belgirl View Post
Lastly "onUnload" isn't working with this particular script and nor is the script you provided.
As mentioned above, if onUnload() doesn't work with your script or page, then there's something else going on. It's a standard Javascript function that works in any recent browser. As for the script I provided, depending on your brand of browser, it may or may not detect the mouse position, so I've pasted in another one below that should work with just about any browser (see below). If you don't understand how it works, please ask.


Quote:
Originally Posted by belgirl View Post
If you are able to further provide insight, that's fine.
Well, I'm trying.


Quote:
Originally Posted by belgirl View Post
Otherwise perhaps someone else who has programming knowledge can help.
If someone else is willing to assist you, they're welcome to.

HTML Code:
<html>
<body>
<!-- mouse coordinate display script, should work with any modern browser -->
<form name="MouseDisplay">
<input type="text" name="MouseX" value="0" size="4"> X<br>
<input type="text" name="MouseY" value="0" size="4"> Y<br>
</form>

<script type="text/javascript">
var IE = document.all?true:false
if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMousePos;
// Temporary variables to hold mouse x-y pos.s
var tempX = 0;
var tempY = 0;

function getMousePos(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  // catch/correct negative values 
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  

  // show the position values in the form
  document.MouseDisplay.MouseX.value = tempX;
  document.MouseDisplay.MouseY.value = tempY;
  return true;
}
</script>
</body>
</html>
__________________
I don't live on the edge, but sometimes I go there to visit.
-------------------------------------------------------------------------
Sanitize Your Data | Oracle Date & Substring Functions | Code Snippet Library | [url=http://www.codmb.com/Call Of Duty[/url]

Last edited by End User; 11-05-09 at 01:13 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #13 (permalink)  
Old 11-14-09, 10:26 AM
Skliros Skliros is offline
New Member
 
Join Date: Nov 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Wow!

@end user
I am new around here and I want to compliment you on your patience and tolerance - it leaves me slack-jawed!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks

Tags
peeling corner


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with exit(); fraggle PHP 2 01-16-06 04:02 AM
Sticky Website - Setting HomePage on Exit rafique JavaScript 1 12-07-05 10:52 AM
will die exit? FiRe PHP 5 03-29-05 09:16 AM
Please Help me Get rid of this parse error gmjan6 PHP 5 06-19-04 01:48 AM
how to exit from keyboard input?? chaos7 Perl 5 05-03-04 05:10 AM


All times are GMT -5. The time now is 07:48 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.