<< Previous Topic | Next Topic >>BACK TO MAIN  

Uh ...Sooth? I need more help

July 21 2000 at 1:26 PM
Chaos  (no login)

 
is there some way to define the properties of a window in an ordinary link? I mean, if I have a text linked to some other page, and it opens as a new window, and I don't want the status bar and all that other crap, and I want to set the size of it, as well.

I know that's possible with JavaScript, but I have no idea how to do that with simple HTML. I know there is a way, and I've seen it before somewhere, but I can't remember what it was.

 
 Respond to this message   
AuthorReply
Soothfast
(Login Sooth)
The Land of Shadow

I think you really have to use JavaScript

July 22 2000, 5:19 AM 

If there's a way to do this with just HTML, I don't know of it. My references all point to JS. In a post below this one I'll give an example of code which does what you want. It's not too complicated, and works for both major browsers.

 
 Respond to this message   
Soothfast
(Login Sooth)
The Land of Shadow

An example....

July 22 2000, 5:29 AM 

In the document head (not body!), have code like this:

<script language="JavaScript">
<!--
function newWindow1() {
handWindow = window.open('ringhand.jpg', 'handWin', 'width=457,height=557')
}
function newWindow2() {
ringWindow = window.open('onering2.jpg', 'ringWin', 'width=432,height=351')
}
function newWindow3() {
eye1Window = window.open('eyeoftower.jpg', 'eye1Win', 'width=524,height=650,scrollbars=yes')
}
// -->
</script>


Then, in the body of your document where your pertinent links are going to be, have something like:

<a href="javascript:newWindow1()">Image #1 — Lord of the Rings</a>
<a href="javascript:newWindow2()">Image #2 — The One Ring</a>
<a href="javascript:newWindow3()">Image #3 — The Nazgűl</a>


Image #1 will open in a window with dimensions 457 by 557 with no scrollbars. Image #2 will open in a window of dimensions 432 by 351 with no scrollbars. Image #3 will be in a window 524 pixels wide and 650 pixels high, and WILL have scrollbars on account of the scrollbars=yes deal. By default NONE of these windows will have toolbars of any sort.


 
 Respond to this message   
Chaos
(no login)

is there some way to...

July 24 2000, 11:08 AM 

do that so there's no script in the head? that's really the problem I have. I don't have access to the header (it's a board)

 
 Respond to this message   
Soothfast
(Login Soothfast)
Forum Owner

Only one way to find out . . .

August 2 2000, 8:27 PM 

Put the script in the BODY instead of the HEAD, and see what happens. Browsers like IE may forgive you, but Netscape may not. Try it out.

 
 Respond to this message   

(Login MLJ)

messageboard won't let me

August 3 2000, 5:11 AM 

it doesn't save it if I add javascript

 
 Respond to this message   
Current Topic - Uh ...Sooth? I need more help
  << Previous Topic | Next Topic >>BACK TO MAIN  
 Copyright © 1999-2009 Network54. All rights reserved.   Terms of Use   Privacy Statement