Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Fixed dimension window
Old 09-18-2007, 04:20 PM Fixed dimension window
Novice Talker

Posts: 11
Location: The cold & windy UK
Trades: 0
Hi there.

I'm using dreamweaver mx to build my site and I want to have a link that opens up a new window, for example 500 x 500 with an image and some text in it. But I dont want the window to be able to be scaled or dragged wider/bigger etc. How can I do this??

Thanks in advance.

Dan
danroach is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-18-2007, 06:20 PM Re: Fixed dimension window
Nathand's Avatar
Extreme Talker

Posts: 233
Location: USA
Trades: 0
Try this:
Code:
<script type="text/javascript">
var newwindow;

 
function resizewindow(popW,popH,location)
{

newwindow=window.open(location,"_blank","resizable=no, width=400, height=400")
}
</script>
 

<a href="#" onClick="javascript:resizewindow(500,500,'http://www.webmaster-talk.com')">Linky</a>

Hope that helped,
Nathan
Nathand is offline
Reply With Quote
View Public Profile
 
Old 09-19-2007, 04:03 PM Re: Fixed dimension window
Novice Talker

Posts: 11
Location: The cold & windy UK
Trades: 0
Hmmmm, that didnt seem to do the trick.

My code looks like this:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<pre><img src="file:///D|/Dan%20Art%20Site/gerontius.jpg" width="500" height="362"><font color="#000000" size="1" face="Verdana, Arial, Helvetica, sans-serif">
<strong><em>'The Dream of Gerontius'</em></strong> - Acrylic on canvas 2007: 100cm x 76cm</font></pre>
</body>
</html>


Do I need to include some sort of command etc at the height and width info?????? If so, what?????

Thanks

Dan
danroach is offline
Reply With Quote
View Public Profile
 
Old 09-23-2007, 08:26 PM Re: Fixed dimension window
Nathand's Avatar
Extreme Talker

Posts: 233
Location: USA
Trades: 0
I apologize for not replying, I've been rather busy the last couple of days...

You don't have a link in your code. Did you want a link to open up a page with the code you posted?
Nathand is offline
Reply With Quote
View Public Profile
 
Old 09-24-2007, 04:30 AM Re: Fixed dimension window
maxxximus's Avatar
Extreme Talker

Posts: 219
Name: Rob
Location: UK
Trades: 0
Attach this behaviour to an anchor tag.

Code:
<a onclick="window.open(this.href,'Any_name', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=530,height=337'); return false;"  href="The target URL goes here" target="_blank"> Your anchor text </a>
maxxximus is offline
Reply With Quote
View Public Profile
 
Old 09-24-2007, 11:27 AM Re: Fixed dimension window
Nathand's Avatar
Extreme Talker

Posts: 233
Location: USA
Trades: 0
That would work too Personally I like using functions that aren't hard coded but that's just me...
Nathand is offline
Reply With Quote
View Public Profile
 
Old 10-25-2007, 12:05 AM Re: Fixed dimension window
Novice Talker

Posts: 7
Trades: 0
Quote:
Originally Posted by Nathand View Post
Try this:
Code:
<script type="text/javascript">
var newwindow;

 
function resizewindow(popW,popH,location)
{

newwindow=window.open(location,"_blank","resizable=no, width=400, height=400")
}
</script>
 

<a href="#" onClick="javascript:resizewindow(500,500,'http://www.webmaster-talk.com')">Linky</a>
Hope that helped,
Nathan
Is there a way to specify these things in CSS, or do we have to copy this script into each page and adjust each window width/height accordingly to every edit??

And thanks by the way, that code was very helpful! I think before I tried using javascript but for some reason javascript always messed up the website whenever I checked it on IE.
rasputinberry is offline
Reply With Quote
View Public Profile
 
Old 10-25-2007, 03:34 AM Re: Fixed dimension window
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Is there a way to specify these things in CSS, or do we have to copy this script into each page and adjust each window width/height accordingly to every edit??
Nope, it can't be done in CSS.


The function could be put in to an external js file and linked in on each page with only the onclick event in the links.
If you are only going to require one size for the pop-up these could be hard-coded into the function and only pass the URL to the function.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Fixed dimension window
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.05224 seconds with 12 queries