djr33
08-06-2006, 10:30 PM
I was thinking about gmail, and then about my own forum. What if I could program all links to give an alert when you were leaving a message that hadn't been saved/posted.
So... I was thinking... sure... add an onclick, with a confirm, and return false. But then.... perhaps it could be done in CSS.
Is there some way to do that? Set every link to a particular javascript function with onclick. Or perhaps onmouseover for images.
Just thinking... there isn't a specific page I'm trying to fix or anything, but I'm sure it could come in handy.
So... I was thinking... sure... add an onclick, with a confirm, and return false. But then.... perhaps it could be done in CSS.
Is there some way to do that? Set every link to a particular javascript function with onclick. Or perhaps onmouseover for images.
Just thinking... there isn't a specific page I'm trying to fix or anything, but I'm sure it could come in handy.