View Full Version : Mouse over help
juggernaut
2006-11-28, 03:54 PM
Is it possible to mouse over a whole page? I would like the mouse over to just show the sponser root url. But do to my script I can't go place a mouse over on every link. So I'm just wondering if this is possile?
Useless
2006-11-28, 04:07 PM
Here yee go:
http://www.javascriptkit.com/script/script2/hidestatus.shtml
but put the URL you want to display in
var statusmsg=""
EDIT - Shit, I'm assuming you can't modify the links themselves at all...
So try this one - http://www.inetmarketing.com/seminar/tips/hide_status_bar.htm
No toying with individual links at all - and again put your URL of choice in
window.status=''
quest
2006-11-28, 04:07 PM
I suppose you could put this in the head section of the page:
<base onmouseover="window.status='http://www.yourlinkhere.com'; return true;">
That will do the whole page.
You can also open the link in a new page with:
<base target="_blank" onmouseover="window.status='http://www.yourlinkhere.com'; return true;">
Ben
juggernaut
2006-11-28, 04:50 PM
Hum might have to go with the one quest has here. If I do then I have to put in www.sponser.com in the script. Cause there are multible sponsers on one page. I take it there is no way to pull the sponser link code and place it in there. IE user rolls over sponser link, real url is http://myurl.com/script/http://sponser.com/afil
script would pull the http://sponser.com and put that only in the bar but do this for mulitble sponsers?
I have done some searches but can't seem to find anything that detailed.
This is a start. You can have the status print whatever you want, i.e. "Click to visit this site"
<script type="text/javascript">
function initialize(){
var x = document.getElementsByTagName('a');
for (var i=0; i< x.length; i++){
x[i].onmouseover = function(){return ShowIt()}
x[i].onfocus = function(){return ShowIt()}
x[i].onmouseout = function(){return ClearIt()}
x[i].target = "_blank";
}
}
function ClearIt(){
window.status = '';
return true;
}
function ShowIt(){
window.status = 'Click to visit this site';
return true;
}
window.onload = initialize;
</script>
** NOTES:
This is the only way I've found to open a new window in XHTML complient pages
Using base target="_blank" in the head, apparently does not work with IE7.
RamCharger
2006-12-26, 12:03 PM
oast: depends on which XHTML spec you're aiming for. My site is completely XHTML 1.0 Transitional compliant (http://validator.w3.org/check?uri=www.adultpicweb.com) and target="_blank" works for me with IE7, Firefox, and Opera. Maybe the doctype you're trying to aim for is Strict which discontinued the target property? Also, if you're trying to use unicode (8 or 16 bit) that opens another bag of nightmares as those wonderful things like & and other tags are invalid. I went with iso-8859-1 for a reason: php provides a function to do the necessary character encoding in urls (htmlspecialchars).
vBulletin® v3.8.1, Copyright ©2000-2026, Jelsoft Enterprises Ltd.