Computer Science Canada

opening new window and some other problem

Author:  Paul [ Sat Apr 03, 2004 5:04 pm ]
Post subject:  opening new window and some other problem

how do you set the dimensions of a new window you open?
I have
code:

<a href="index1.html" target="_blank" onMouseover="window.status='Read and agree to the disclaimer before entering!';return true" onMouseout="window.status=''">LINK</a>

also, what do I do when the page says "Done, but with errors on page"?

Author:  jonos [ Sun Apr 04, 2004 2:01 am ]
Post subject: 

i don't have an answer to your first question, but you may have to use javascript for what you want to do with the window.

as to your second question, do the w3c test thinger and see what they see, and also debug it by trying to see what youve done wrong.

Author:  Amailer [ Sun Apr 04, 2004 9:04 am ]
Post subject: 

code:

<script type="text/javascript">
<!--
function openwindow(){
        window.open ("","Copyright","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width=500,height=220");
}
//-->
</SCRIPT>


use that..

Author:  Paul [ Sun Apr 04, 2004 9:23 am ]
Post subject: 

Im suppose to put it in the head of the page with the link right? how do I call this function?

Author:  Amailer [ Sun Apr 04, 2004 9:35 am ]
Post subject: 

ya you are, and you just put it as the url of the link (in the <a href="...)

Author:  PaddyLong [ Sun Apr 04, 2004 6:05 pm ]
Post subject: 

or as <a href="#" onClick='openwindow'>

Author:  Amailer [ Sun Apr 04, 2004 6:09 pm ]
Post subject: 

code:

<script type="text/javascript">
<!--
function openwindow(url){
   window.open (url,"Copyright","toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width=500,height=220");
}
//-->
</SCRIPT>


code:

<a href="javascript:openwindow("http://testsite.com")">


Is that correct?


: