aximbigfan Posted June 16, 2008 Share Posted June 16, 2008 I have this code: function trackingout(evt) { if(evt) { var elem = (evt.target) ? evt.target :evt.srcElement; if(elem.id = "trackingbar") { var cpos = evt.offsetX; var perc = (cpos / 3)-1; page("?trackpos="+ perc); } } } addEvent(window, "load", function() { addEvent(document.body, "mousedown", function(evt) { trackingout(evt); } ); } However it does not work. Any ideas? Chris Quote Link to comment Share on other sites More sharing options...
haku Posted June 16, 2008 Share Posted June 16, 2008 Not if you don't tell us what you mean by 'doesn't work'. Quote Link to comment Share on other sites More sharing options...
aximbigfan Posted June 17, 2008 Author Share Posted June 17, 2008 It says addEvent is not a valid function... Chris Quote Link to comment Share on other sites More sharing options...
haku Posted June 17, 2008 Share Posted June 17, 2008 Sorry, can't help with that one. I don't know about addEvent. What are you trying to do? Quote Link to comment Share on other sites More sharing options...
aximbigfan Posted June 17, 2008 Author Share Posted June 17, 2008 I have a WinAMP remote control, and one of the things is that there is a tracking bar, where it says how far along the media is. I want the user to be able to click on the bar, then have the mouse cords taken, and then make an ajax request with that data. EVERYTHING but this is figured out, and it is getting so annoying because this should be simple, I just need the mouse cords. Thanks, Chris Quote Link to comment Share on other sites More sharing options...
haku Posted June 18, 2008 Share Posted June 18, 2008 By cords do you mean co-ords, as in co-ordinates? - not that I will be able to help you after you reply , I'm still out on this one. But maybe the clarification will help someone else be able to help you. Quote Link to comment Share on other sites More sharing options...
aximbigfan Posted June 18, 2008 Author Share Posted June 18, 2008 coordinates... Thanks! Chris Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.