Popup window that works in IE an NS

I need the html code for when I click on a link it opens the link in a small popup window. One that does not have any buttons or menus. Here's the site that I am working with.

http://www.surmodics.com/calevent/cal2nd99.html 

On Sept 1st - 4th has a link to a test page. The only reason that I stated this it's working within a table.

The code that I am using now is
<a href="#" onClick="window.open('test.html','Conference','hight=100,width=50,menubar=0,status=0');"> (cell 1 - 4) </a>

This code works inside Internet Explorer but not Netscape, can someone help?

I don't think it is that difficult, but I can't find it.

Thanks in advance
Dan
Dan SheridanSenior System Eng / vITMAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

knightEknightCommented:
FYI: mispelled "hight"
0
chewymonCommented:
In the <head>

<SCRIPT LANGUAGE="JavaScript">

<!--  Hide from old browsers

function tester(){
window.open("test.html", "myRemote","height=100,width=50);
}

      
// end hiding -->

</SCRIPT>


Where you want the link to appear:


<a href="#" onClick="tester()">
  Click Me</a>



0
andrivCommented:
dsheridan, look in you previous question for the problem with your page.  I'm sorry it took so long for me to get back to you.  I hate to see you give out points twice for the same question.
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

egbservicesCommented:
Just cut and paste to following code into your <head> and <body> It works for me! If it works for you I'll take the points...  thanks :-) Edi

----------------------------------------------------------------------
<html>
<head>
      <title>Popup Window</title>

<script language=javascript>
<!--
function newWin(url) {
 projWindow = window.open(url,"Projects","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=600,height=100");
 var netscape = false
 if (navigator.appName == "Netscape" && (navigator.appVersion.substring(0,1) == "3" || navigator.appVersion.substring(0,1) == "4")) {
  netscape = true; projWindow.focus()
 } else {
  netscape=false
 }
}
//-->
</script>

</head>

<body>

<br><a href="javascript:newWin('http://www.experts-exchange.com/jsp/qShow.jsp?ta=html&qid=10231904 ');"><img SRC="images/your.gif" ALT="Your image" NOSAVE BORDER=0 height=28 width=100></a></td>

</body>
</html>
0
Dan SheridanSenior System Eng / vITMAuthor Commented:
Chewymon, Sorry didn't work.

eqbservices, Sorry didn't work.

Remember, this is within side a table. Now someone told me that I have to put a link in each cell. Is this true? And if I do can have a link for the cell or just the text in the cell?

Please take a look the website. It  doesn't work, unless I put the code in wrong.

http://www.surmodics.com/calevent/cal2nd99.html


0
Dan SheridanSenior System Eng / vITMAuthor Commented:
One other thing, is there a command that I can use to close that popup window?
0
brigmarCommented:
For NN, yup, you'll have to repeat the hyperlink for each <TD> element.
If you're going to do that, then it's worthwhile putting the code into a function...

<html>
<head>
<script language="javascript"> <!--
var hWin = new Array();
function doIt() {
  hWin[hWin.length] = window.open( 'test.html' , 'Conference' , 'height=100,width=50' );
  return false;
}

function closewin() {
 n = hWin.length-1;
 while( n>=0 && hWin[n].closed ) {
  n--;
 }
 if(n>=0) {
  hWin[n].close();
  hWin.length = n;
 } else hWin.length = 0;
}
// -->
</script>
</head>
<body>
<a href="javascript:;" onclick="closewin()">Close a Window</a>
<table>
<tr>
<td><a href="javascript:;" onclick="doIt()">1</a></td>
<td><a href="javascript:;" onclick="doIt()">2</a></td>
<td><a href="javascript:;" onclick="doIt()">3</a></td>
<td><a href="javascript:;" onclick="doIt()">4</a></td>
</tr>
</table>
</body>
</html>

When you open a window using the window.open() method, it returns a reference to that window, so you can refer to it in your scripts..

You can then close the window using
winreference.close();

This page creates and maintains an array of the opened windows, so that they can be closed down..

Brian
0
Dan SheridanSenior System Eng / vITMAuthor Commented:
Brian, within the javascript:; statement that I have for each cell
instead of having twenty diffent java functions, can I specify the filename
in the <a href></a> statment?

And also is there a way to have a close statment in the popup window itself?

Thanks
Dan

0
brigmarCommented:
You want to launch a particular url for each link..?
No problemo :)

<html>
<head>
<script language="javascript"> <!--
function doIt(url) {
  window.open( url, '', 'height=150,width=150' );
  return false;
}

// -->
</script>
</head>
<body>
<table>
<tr>
<td><a href="javascript:;" onclick="doIt('b.htm')">b.htm</a></td>
<td><a href="javascript:;" onclick="doIt('c.htm')">c.htm</a></td>
<td><a href="javascript:;" onclick="doIt('d.htm')">d.htm</a></td>
<td><a href="javascript:;" onclick="doIt('e.htm')">e.htm</a></td>
</tr>
</table>
</body>
</html>

As for the close sitting in each window... you'd need to put that into each window...

a.htm
-----

<html>
 <body>
I'm a little teapot<br>
short and stout<br>
<a href="javascript:;" onclick="window.close();">Close Me</a>
 </body>
</html>


Brian
0
Dan SheridanSenior System Eng / vITMAuthor Commented:
Thanks, post and you got it.

I have one question, where did you learn code in Java, and where is a good place to start learning java and use a good resource?

Dan
0
brigmarCommented:
Dan,

Something you'll learn is:
java != javascript
!= means "not equal to"

This is javascript. java is a different animal.

As for learning...
stage 1 : using "view source" on my browser
stage 2 : looking up tutorials online
stage 3 : A big weighty tome or 3
stage 4 : checking netscape devedge / msdn scripting technologies
stage 5 : E-E & the comp.lang.javascript newsgroup

Good resources...? type "javascript tutorial" into any search engine :)

www.webreference.com
www.experts-exchange.com (just watching and learning)
http://www.hotwired.com/webmonkey/javascript/tutorials/tutorial1.html


.... and the answer...


<html>
<head>
<script language="javascript"> <!--
function doIt(url) {
  window.open( url, '', 'height=150,width=150' );
  return false;
}

// -->
</script>
</head>
<body>
<table>
<tr>
<td><a href="javascript:;" onclick="doIt('b.htm')">b.htm</a></td>
<td><a href="javascript:;" onclick="doIt('c.htm')">c.htm</a></td>
<td><a href="javascript:;" onclick="doIt('d.htm')">d.htm</a></td>
<td><a href="javascript:;" onclick="doIt('e.htm')">e.htm</a></td>
</tr>
</table>
</body>
</html>

As for the close sitting in each window... you'd need to put that into each window...

a.htm
-----

<html>
 <body>
I'm a little teapot<br>
short and stout<br>
<a href="javascript:;" onclick="window.close();">Close Me</a>
 </body>
</html>


Brian
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Dan SheridanSenior System Eng / vITMAuthor Commented:
You have been a big help.

Thanks
Dan
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.