NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Web Design Discussion
Reload this Page New window size?

Web Design Discussion Discussion of web design techniques, advice, browser issues, software, design firms.

Advanced Search
10 members in live chat ~  
NamePros Design Contests NamePros Design Contests
Forum Sponsorship
Join in on the FUN! You can start an affordable design contest and pick from entries talented members submit or you can enter a design contest for a chance to win CASH PRIZES! What are you waiting for? Get started in the fun TODAY! - Banners, Logos, Mascots, and MORE! (Please READ the design Contest section rules Prior to starting or entering a contest)



Closed Thread
 
LinkBack Thread Tools
Old 09-13-2003, 05:40 PM THREAD STARTER               #1 (permalink)
New Member
Join Date: Aug 2003
Posts: 6
krissy_b is an unknown quantity at this point
 



New window size?


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!!!!
__________________
--Kristen
krissy_b is offline  
Old 09-13-2003, 06:14 PM   #2 (permalink)
NamePros Member
Join Date: Jul 2003
Posts: 118
web guru is an unknown quantity at this point
 



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.
????: NamePros.com http://www.namepros.com/web-design-discussion/15242-new-window-size.html

Then use this code for your link,

Code:
 <a href="javascript:win()">**Link goes here**</a>
Hope this helps!!
web guru is offline  
Old 09-13-2003, 06:18 PM THREAD STARTER               #3 (permalink)
New Member
Join Date: Aug 2003
Posts: 6
krissy_b is an unknown quantity at this point
 



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?
__________________
--Kristen
krissy_b is offline  
Old 09-13-2003, 06:38 PM   #4 (permalink)
NamePros Member
Join Date: Jul 2003
Posts: 118
web guru is an unknown quantity at this point
 



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.
????: NamePros.com http://www.namepros.com/showthread.php?t=15242

This will work as long as I have understood you right this time.
web guru is offline  
Old 09-13-2003, 07:25 PM THREAD STARTER               #5 (permalink)
New Member
Join Date: Aug 2003
Posts: 6
krissy_b is an unknown quantity at this point
 



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".
__________________
--Kristen
krissy_b is offline  
Old 09-14-2003, 03:25 AM   #6 (permalink)
NamePros Member
Join Date: Jul 2003
Posts: 118
web guru is an unknown quantity at this point
 



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');
????: NamePros.com http://www.namepros.com/showthread.php?t=15242
//-->

}
</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.
web guru is offline  
Old 09-14-2003, 05:26 AM   #7 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer
shouldnt the <script> bit go in the header tag?
adam_uk is offline  
Old 09-14-2003, 06:43 AM   #8 (permalink)
NamePros Member
Join Date: Jul 2003
Posts: 118
web guru is an unknown quantity at this point
 



Na it dosent matter, I have tried the script out in between the <body> tags and it works fine.
web guru is offline  
Old 09-14-2003, 08:51 AM   #9 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer
Quote:
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
adam_uk is offline  
Old 09-14-2003, 01:48 PM   #10 (permalink)
NamePros Member
Join Date: Jul 2003
Posts: 118
web guru is an unknown quantity at this point
 



Its ok I will forgive you this time
web guru is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 07:35 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger