Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is this code typed correctly?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
<a href=&quot;URL&quot; onmouseover='My pictures';onclick=&quot;NewWindow(this.href,'My pictures','790','497','yes','center');return false&quot; onfocus=&quot;this.blur()&quot;>Click here</a>

I'm trying to hide the URL by using onmouseover, but I dont know where to place it on this pop-up code.
 
self.status changes the onmouseover text that appears in the status bar:


<a href=&quot;URL&quot; onmouseover=&quot;self.status='My pictures'; return true&quot; onmouseout=&quot;self.status=' '; return true&quot; onclick=&quot;NewWindow(this.href,'My pictures','790','497','yes','center');return false&quot; onfocus=&quot;this.blur()&quot;>Click here</a>
 
If I do this, the pop up window with no directories, status, menubar, toolbar shows up. I wanted a window that doesnt have those, and using an onmouseover to hide the URL.

<script language=&quot;javascript&quot; type=&quot;text/javascript&quot;>
<!--
/****************************************************
Author: Eric King
Url: This script is free to use as long as this info is left in
Featured on Dynamic Drive script library (****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos==&quot;random&quot;){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos==&quot;center&quot;){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!=&quot;center&quot; && pos!=&quot;random&quot;) || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}
// -->
</script>


<a href=&quot;URL&quot; onclick=&quot;NewWindow(this.href,'My pictures','790','497','yes','center');return false&quot; onfocus=&quot;this.blur()&quot;>Click here</a>
 
try this:

<a href=&quot;#&quot; onmouseup=&quot;window.status=' '; return true&quot; onmouseover=&quot;window.status='My pictures'; return true&quot; onmousedown=&quot;self.status=' ';return true&quot; onmouseout=&quot;window.status=' '; return false&quot; onclick=&quot;NewWindow('test2.htm','Mypictures','790','497','yes','center');return
false&quot;>Click here</a>


It works fine for me, the window has no menu, status bar, toolbar etc.

If you want these to appear then replace no with yes in the following line of script for the options that you want to appear:

settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';

 
Okay it hides the URL, but this time two windows pops-up
The first one is <a href=&quot;#&quot; and the other is ('URL'. I only want &quot;('URL'&quot; to pop up and not the other. How do I get rid of the other one?

<a href=&quot;#&quot; onmouseup=&quot;window.status=' '; return true&quot; onmouseover=&quot;window.status='My pictures'; return true&quot; onmousedown=&quot;self.status=' ';return true&quot; onmouseout=&quot;window.status=' '; return false&quot; onclick=&quot;NewWindow('URL','Mypictures','790','497','no','center');return
false&quot;>Click here</a>
 
weird one, cant seem to hide it. If you can put all of those event codes into a span or div or something:

<span href=&quot;#&quot; onmouseup=&quot;window.status=' '; return true&quot; onmouseover=&quot;window.status='My pictures'; return true&quot; onmousedown=&quot;self.status=' ';return true&quot; onmouseout=&quot;window.status=' '; return false&quot; onclick=&quot;NewWindow('URL','Mypictures','790','497','no','center');return
false&quot;>Click here</span>
 
weird one, cant seem to hide it. If you can put all of those event codes into a span or div or something:

<span onmouseover=&quot;window.status='My pictures'; return true onclick=&quot;NewWindow('someURL.htm','My_Pictures','790','497','no','center');return
false&quot; style=&quot;color:blue; text-decoration:underline&quot;>Click here</span>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top