Dynadot โ€” .com Transfer

New window size?

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch
Impact
0
I have a hyperlink to a Swish animation (it's like Flash) that I want to open up in a new window. I want the new window to be the size of the animation. Is there a way of specifying the size of the new window in FrontPage, or does anyone know the html coding?

Thanks!!!!
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
You would have to use javaScript to do this. Put the following function anywhere on your page, I'd suggest the top.


Code:
<script>
function win(){  
    <!--
thWin = window.open('filename.html','newWindow','width=400,height=400,resizable=no,scrollbars=no,menubar=no,toolbar=no,directories=no,location=no,status=no');
//-->
}
</script>

You can change any of the parameters such as width, height, menubar etc to what ever you want.

Then use this code for your link,

Code:
 <a href="javascript:win()">**Link goes here**</a>

Hope this helps!!
 
0
•••
Thanks for the help!!! But I should have been more specific. There are actually going to be three links to three different swish animations on this page....how can I specify the size of each new (and differently sized) window?
 
0
•••
I think I understand you, if I do you can use the same code with a few changes to it.

Code:
<script>
function win(w, h, name){  
    <!--
thWin = window.open([name]+'.html','newWindow','width='+[w]+',height='+[h]+',resizable= no,scrollbars=no,menubar=no,toolbar=no,directories=no,location=no,status=no');
//-->
}
</script>

Now do your links to the differnet files as follows,

Code:
<a href="javascript:win(200, 20, 'swishOne.html')">**Link one goes here**</a> 

<a href="javascript:win(20, 300, 'swishTwo.html')">**Link two goes here**</a> 

<a href="javascript:win(200, 200, 'swishThree.html')">**Link three goes here**</a>

All you have to do is change the width and height and file name parameters in the function call and the link names.

This will work as long as I have understood you right this time.
 
0
•••
Hmmm...I'm pretty sure you did understand me right, but it didn't work. :( It gave me an error message every time I clicked on the page, and the links themselves didn't work right.

I may have done something wrong in incorporating the code into my page, but I'm 99% sure i did it right. Also, I forgot to mention (but it shouldn't make a difference) that the links are images. I just put them where you said "Link-whatever goes here".
 
0
•••
Ok I thin I know what the problem is. I think when you are copying and pasting the code into your page there are extra spaces being added. Right do this, cop this code into your page anywhere.

<script>
function win(w, h, name){

<!--
thWin = window.open([name]+'.html','newWindow','width='+[w]+',height='+[h]+',resizable= no,scrollbars=no,menubar=no,toolbar=no,directories=no,location=no,status=no');
//-->

}
</script>

The following part of the functions code must contain no spaces and all be on one line.

thWin = window.open([name]+'.html','newWindow','width='+[w]+',height='+[h]+',resizable= no,scrollbars=no,menubar=no,toolbar=no,directories=no,location=no,status=no');

Then the link just stays the same except your using an image but that wont make any difference.

Let me know if you have any problems.
 
0
•••
shouldnt the <script> bit go in the header tag?
 
0
•••
Na it dosent matter, I have tried the script out in between the <body> tags and it works fine.
 
0
•••
Originally posted by web guru
Na it dosent matter, I have tried the script out in between the <body> tags and it works fine.

ill shut up then :)
 
0
•••
Its ok I will forgive you this time :D
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
CatchedCatched
Escrow.com
Spaceship
Domain Recover
CryptoExchange.com
Catchy
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back