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!

Closed Thread
Old 05-05-2006, 04:13 PM Page Resize?
merzitar's Avatar
Novice Talker

Posts: 13
Location: Uk, England
Trades: 0
Hi, can someone tell me how to make the page samller.

example; Click on a link and it opens up a new seperate page (TARGET="_BLANK") but the page is like.. 200 x 340 instead of a normal size page.

Like people do on pop-ups.


Also, i need a code to disable "Maximixe" on the page.


thanks
__________________
Name: Chris
Age: 16
Sex: Male
merzitar is offline
View Public Profile Visit merzitar's homepage!
 
 
Register now for full access!
Old 05-05-2006, 05:30 PM Re: Page Resize?
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Chris I think what you're looking for is a little javascript. You can control the new window more that way.

Here's a link from on Using the window.open method
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
View Public Profile Visit vangogh's homepage!
 
Old 05-05-2006, 06:25 PM Re: Page Resize?
merzitar's Avatar
Novice Talker

Posts: 13
Location: Uk, England
Trades: 0
Thanks, but i don't know how to do Java Script.

I have kept it bookmarked anyway though so when i know how to code Java properly, i can use it.

Thanks


PS:
Unless you can help me?
if you can, it'll be great, if you can't no matter
__________________
Name: Chris
Age: 16
Sex: Male
merzitar is offline
View Public Profile Visit merzitar's homepage!
 
Old 05-05-2006, 10:05 PM Re: Page Resize?
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
It's actually pretty easy to use window.open. You don't really need to know much about JavaScript. Instead of adding target="_blank" to your <a> tag you would do something like:

HTML Code:
<a href="#" onclick="window.open('pathToYourFile','windowName','scrollbars=yes,resizable=yes,width=550, height=565');"
The # for the href just holds the place for the javascript which starts with the onlcick even handler. So when anyone clicks on the link the window.open dunction will take over.

That first parameter in window.open is the path to the file you want open. It's the same thing you would have put into the href="" The next parameter is the name you want to give to the new window. That's so you could write code for that window later. After that you can add a lot of different things to determine how you want the new window to look.

In the code I gave I just allowed for the window to have a scrollbar and be resizable in case someone wanted to make it bigger or smaller and I also specified a width and height. The width and height are what the new window will open at first.

One thing to notice is that the path and the window name get quotes places around them and then all the other features get one set of quotes around them, but not around each individual feature. You separate the different extra features with a comma.

The link I gave before lists some of the other features you can control. If you do a search for window.open you'll find a lot of other pages that will give you similar or more information.

Feel free to just use the line of code I supplied and substitute the values you want for the width and height as well as the path to the file and the name for the window.

I hope that helps.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by vangogh; 08-05-2006 at 12:18 PM..
vangogh is offline
View Public Profile Visit vangogh's homepage!
 
Old 05-06-2006, 06:13 AM Re: Page Resize?
merzitar's Avatar
Novice Talker

Posts: 13
Location: Uk, England
Trades: 0
hey, thanks so much.

you are realy great!!
__________________
Name: Chris
Age: 16
Sex: Male
merzitar is offline
View Public Profile Visit merzitar's homepage!
 
Old 05-06-2006, 02:48 PM Re: Page Resize?
vangogh's Avatar
Post Impressionist

Latest Blog Post:
Why Responsive Design?
Posts: 10,815
Name: Steven Bradley
Location: Boulder, Colorado
Trades: 0
Thanks Chris. Glad I could help. Let me know if you get it working or if you still have more questions.
__________________
l Search Engine Friendly Web Design |
Please login or register to view this content. Registration is FREE

l Tips On Marketing, SEO, Design, and Development |
Please login or register to view this content. Registration is FREE

l
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
vangogh is offline
View Public Profile Visit vangogh's homepage!
 
Old 08-05-2006, 08:05 AM Re: Page Resize?
Novice Talker

Posts: 8
Name: Martin
Trades: 0
or, instead of using all that code in one line, how about external

<script language="javascript">
function newWindow()
{
cuteLittleWindow = window.open("file_name.html", "littleWindow", "location=no,resize=no");
}
</script>

use <a href="javascript:newWindow()></a> as the link..

let me know what you think.
herbie497 is offline
View Public Profile
 
Old 08-05-2006, 12:16 PM Re: Page Resize?
funkdaddu's Avatar
Web Design Snob

Posts: 635
Trades: 0
Instead of using href="#" or href="javascript:blah", just use your targeted page so that anyone without JS turned on will still get the right page:
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

	<head>
		<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
		<title>Untitled Page</title>
		<script type="text/javascript"><!--
function newWindow(object) {
	cuteLittleWindow = window.open(object.href, "littleWindow", "location=no,resize=no,width=200,height=300");
}
//-->
</script>
	</head>

	<body bgcolor="#ffffff">
		<p><a href="mypage.html" onclick="newWindow(this); return false;">Open a new window.</a></p>
	</body>

</html>
funkdaddu is offline
View Public Profile Visit funkdaddu's homepage!
 
Closed Thread     « Reply to Page Resize?
 

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 0.27917 seconds with 12 queries