
10-26-2009, 06:50 PM
|
|
Regular Babbler
|
|
Join Date: Jul 2009
Posts: 91
|
|
How to creat a small link window?
Hey everyone! I am interested in creating a link for an image on my website, which I have done. However, the problem I am having is, the image opens in a window that is too big. Does anyone know how to create a small window?
|

10-26-2009, 06:51 PM
|
|
Regular Babbler
|
|
Join Date: Jul 2009
Posts: 91
|
|
or how to make the window small
|

10-27-2009, 11:07 AM
|
 |
Super Moderator
|
|
Join Date: Dec 2007
Posts: 2,370
|
|
Try this.
I create some small windows for my footer reference pages like the privacy statements like this (adjust settings as desired, of course):
In the head of the special page put an embedded style:
<head>
[other content]
<style type="text/css">
<!--
.setwidth{
width: 560px;
}
.container{
background-color: white;
padding: 0px 50px 50px 50px;
}
-->
</style>
</head>
Then for the body the related classes:
<body class="setwidth">
<div class="container">
This works fine for me.
|

10-27-2009, 10:09 PM
|
 |
Master Babbler
|
|
Join Date: May 2009
Posts: 158
|
|
If you're OK using JavaScript, you can set size parameters in the window.open function. To open a window 500px by 500px, try this
HTML Code:
<a href="PICTURE_URL" target="_blank" onclick="window.open(PICTURE_URL, 'popupPicture', 'width=500, height=500'); return false;">click!</a>
James, I'm probably missing something obvious here, but I can't get your method to work. I've tried it as you've shown and with an inline style. I've also tried opening the page directly and via another page with target="_blank". It doesn't seem to work in any browser (Fx 3.5, IE8, Safari 4, Opera 10). I also can't find any mention of that technique in Google; everyone uses JavaScript. Help...?
Last edited by meloncholy; 10-27-2009 at 10:14 PM.
|

10-28-2009, 08:22 AM
|
 |
Super Moderator
|
|
Join Date: Dec 2007
Posts: 2,370
|
|
OK.
My apologies. I should have included the link info as well. It is like you are suggesting with Javascript. In looking at what I have my file is the privacystatement.php which you would change to your own. The inlinelink class is just a css component where I change the appearance of the link (no underline and different color). This is what I have:
<span><a class="inlinelink" onclick="MyWindow=window.open('privacystatement.ph p','MyWindow','toolbar=no,location=no,directories= no,status=no,menubar=no,scrollbars=yes,resizable=y es,width=550,height=550'); return false;" href="privacystatement.php">Privacy</a> </span>
|

10-28-2009, 09:25 AM
|
 |
Ultimate Babbler
|
|
Join Date: Jun 2009
Location: Kent, England
Posts: 1,466
|
|
My live chat link uses Javascript as well. It's pretty much the same as meloncholy's example. I have tested it in Firefox, IE7, Safari, Chrome and Opera and it works perfectly. Im too scared to try it in IE6
Code:
<a href="#" onclick="javascript:void(window.open('YOURFILENAMEHERE','','width=600,height=600,left=0,top=0,resizable=yes,menubar=no,location=yes,status=yes,scrollbars=yes'))">YOURLINKNAME</a>
Last edited by sequencehosting; 10-28-2009 at 09:28 AM.
|

10-30-2009, 12:51 PM
|
 |
Master Babbler
|
|
Join Date: May 2009
Posts: 158
|
|
Thanks for that, James (and sequencehosting). I was tired and thought I'd done something silly, but just couldn't figure out what...
|

11-02-2009, 05:55 PM
|
|
Regular Babbler
|
|
Join Date: Jul 2009
Posts: 91
|
|
I am totally confused. I am successful in creating a link that opens up fine but the window is just too big. What I would like to know is, how do i make the window smaller. For instance, what steps do i have to take? do i have to write css coding before i highlight to make a link or do I write the css after I have created the link? next, do I have to individually do the sizing for each window link of the same size or can I make the sizing the be the same for all the following links?
|

11-02-2009, 05:57 PM
|
|
Regular Babbler
|
|
Join Date: Jul 2009
Posts: 91
|
|
If a sample of the coding can be provided as how to do this, this would be helpful
|

11-02-2009, 06:39 PM
|
 |
Ultimate Babbler
|
|
Join Date: Jun 2009
Location: Kent, England
Posts: 1,466
|
|
Quote:
Originally Posted by novicer
If a sample of the coding can be provided as how to do this, this would be helpful
|
Have you tried the above examples?
Code:
<a href="#" onclick="javascript:void(window.open('http://www.yourpage.com','','width=600,height=600,left=0,top=0,resizable=yes,menubar=no,location=yes,status=yes,scrollbars=yes'))">your link name</a>
replace: http://www.yourpage.com with the page you would like to open in the small window (could be mypage.html or mypage.php)
replace: your link here with the anchor text you would link to use (link text) for example 'my link'
|

11-03-2009, 05:02 PM
|
|
Regular Babbler
|
|
Join Date: Jul 2009
Posts: 91
|
|
Hey everyone: So for the coding above, I am having some problems, within the code I am getting a message that says that the width is not permitted for the <a> tag. does anyone have any suggestions or have come across the same problem
|

11-03-2009, 05:05 PM
|
 |
Ultimate Babbler
|
|
Join Date: Jun 2009
Location: Kent, England
Posts: 1,466
|
|
Quote:
Originally Posted by novicer
Hey everyone: So for the coding above, I am having some problems, within the code I am getting a message that says that the width is not permitted for the <a> tag. does anyone have any suggestions or have come across the same problem
|
Hmm thats very strange. Try posting the code on here and taking a screenshot of the error. Im sure someone will know what to do
|

11-03-2009, 05:08 PM
|
|
Regular Babbler
|
|
Join Date: Jul 2009
Posts: 91
|
|
alo, what should I be placing between the double quotes that come after scrollbars=yes'))" its asking me to put something here
|

11-03-2009, 05:11 PM
|
|
Regular Babbler
|
|
Join Date: Jul 2009
Posts: 91
|
|
Ok, so here is the coding that I am having problems with as per my message above.
Re: I am having some problems within the code I am getting a message that says that the width is not permitted for the <a> tag. does anyone have any suggestions or have come across the same problem.
<a href="promotion%20pays%20products/bike%20kit.jpg"onclick="javascript:void(window.ope n('http://www.promotionpay.com"'width=600
",height=600,left=0,top=0,resizable=yes,menubar=no ,location=yes,status=yes,scrollbars=yes'))">"promo tion%20pays%20products/bike%20kit.jpg"</a
|

11-03-2009, 05:24 PM
|
 |
Ultimate Babbler
|
|
Join Date: Jun 2009
Location: Kent, England
Posts: 1,466
|
|
Quote:
Originally Posted by novicer
Ok, so here is the coding that I am having problems with as per my message above.
Re: I am having some problems within the code I am getting a message that says that the width is not permitted for the <a> tag. does anyone have any suggestions or have come across the same problem.
<a href="promotion%20pays%20products/bike%20kit.jpg"onclick="javascript:void(window.ope n('http://www.promotionpay.com"'width=600
",height=600,left=0,top=0,resizable=yes,menubar=no ,location=yes,status=yes,scrollbars=yes'))">"promo tion%20pays%20products/bike%20kit.jpg"</a
|
Are you trying to link to an image called this? promotion%20pays%20products/bike%20kit.jpg or promotionpay.com?
Also </a should be </a>
ope n should be open
You also do not need "" between ></a> so change >""</a> to ></a>
Last edited by sequencehosting; 11-03-2009 at 05:28 PM.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -6. The time now is 07:01 PM.
|
Subscribe to RSS
WB Sponsors
Search Engine Optimization
flash chat
Home Jobs Online
Search Engine Marketing
Paid Surveys
Web Design Company
custom website design
Best Links Management Software
Online Advertising Solution FREE trial!
|