Website Babble Webmaster Forums  


Go Back   Website Babble Webmaster Forums > Creating a Website > HTML, PHP, CSS, Javascript & Coding/Programming Topics

Your WB Notifications

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-26-2009, 06:50 PM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default 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?
Reply With Quote
  #2 (permalink)  
Old 10-26-2009, 06:51 PM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default

or how to make the window small
Reply With Quote
  #3 (permalink)  
Old 10-27-2009, 11:07 AM
James's Avatar
Super Moderator
 
Join Date: Dec 2007
Posts: 2,750
James is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation bars
Default 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.
__________________
Good Success!

Douglas County Master Gardeners
"We don't always get what we want, but we always get what we expect."
Reply With Quote
  #4 (permalink)  
Old 10-27-2009, 10:09 PM
meloncholy's Avatar
Master Babbler
 
Join Date: May 2009
Posts: 250
meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)
Default

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...?
__________________
Pole Exercise - Pole dancing evolved

Last edited by meloncholy; 10-27-2009 at 10:14 PM.
Reply With Quote
  #5 (permalink)  
Old 10-28-2009, 08:22 AM
James's Avatar
Super Moderator
 
Join Date: Dec 2007
Posts: 2,750
James is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation barsJames is an elite member of WB with the maximum amount of reputation bars
Default 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>&nbsp;&nbsp;&nbsp;</span>
__________________
Good Success!

Douglas County Master Gardeners
"We don't always get what we want, but we always get what we expect."
Reply With Quote
  #6 (permalink)  
Old 10-28-2009, 09:25 AM
sequencehosting's Avatar
Ultimate Babbler
 
Join Date: Jun 2009
Location: Kent, England
Posts: 1,335
sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)
Default

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>
__________________
Professional Website Hosting - Now Hosting Over 75 Websites! >Testimonials<
Professional cPanel Web Hosting from $1/month!
Create your own website/blog/forum with our 30-Day FREE Trial
WEBSITE BABBLE SPECIAL! FREE Domain! - FREE Wordpress Setup! - 24 Hour Support

Last edited by sequencehosting; 10-28-2009 at 09:28 AM.
Reply With Quote
  #7 (permalink)  
Old 10-30-2009, 12:51 PM
meloncholy's Avatar
Master Babbler
 
Join Date: May 2009
Posts: 250
meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)meloncholy has an outstanding reputation at WB (over 500 points)
Default

Thanks for that, James (and sequencehosting). I was tired and thought I'd done something silly, but just couldn't figure out what...
__________________
Pole Exercise - Pole dancing evolved
Reply With Quote
  #8 (permalink)  
Old 11-02-2009, 05:55 PM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default

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?
Reply With Quote
  #9 (permalink)  
Old 11-02-2009, 05:57 PM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default

If a sample of the coding can be provided as how to do this, this would be helpful
Reply With Quote
  #10 (permalink)  
Old 11-02-2009, 06:39 PM
sequencehosting's Avatar
Ultimate Babbler
 
Join Date: Jun 2009
Location: Kent, England
Posts: 1,335
sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)
Default

Quote:
Originally Posted by novicer View Post
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'
__________________
Professional Website Hosting - Now Hosting Over 75 Websites! >Testimonials<
Professional cPanel Web Hosting from $1/month!
Create your own website/blog/forum with our 30-Day FREE Trial
WEBSITE BABBLE SPECIAL! FREE Domain! - FREE Wordpress Setup! - 24 Hour Support
Reply With Quote
  #11 (permalink)  
Old 11-03-2009, 05:02 PM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default

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
Reply With Quote
  #12 (permalink)  
Old 11-03-2009, 05:05 PM
sequencehosting's Avatar
Ultimate Babbler
 
Join Date: Jun 2009
Location: Kent, England
Posts: 1,335
sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)
Default

Quote:
Originally Posted by novicer View Post
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
__________________
Professional Website Hosting - Now Hosting Over 75 Websites! >Testimonials<
Professional cPanel Web Hosting from $1/month!
Create your own website/blog/forum with our 30-Day FREE Trial
WEBSITE BABBLE SPECIAL! FREE Domain! - FREE Wordpress Setup! - 24 Hour Support
Reply With Quote
  #13 (permalink)  
Old 11-03-2009, 05:08 PM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default

alo, what should I be placing between the double quotes that come after scrollbars=yes'))" its asking me to put something here
Reply With Quote
  #14 (permalink)  
Old 11-03-2009, 05:11 PM
Master Babbler
 
Join Date: Jul 2009
Posts: 105
novicer has no reputation at Website Babble yet.
Default

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
Reply With Quote
  #15 (permalink)  
Old 11-03-2009, 05:24 PM
sequencehosting's Avatar
Ultimate Babbler
 
Join Date: Jun 2009
Location: Kent, England
Posts: 1,335
sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)sequencehosting has a stellar WB reputation (over 400 points)
Default

Quote:
Originally Posted by novicer View Post
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>
__________________
Professional Website Hosting - Now Hosting Over 75 Websites! >Testimonials<
Professional cPanel Web Hosting from $1/month!
Create your own website/blog/forum with our 30-Day FREE Trial
WEBSITE BABBLE SPECIAL! FREE Domain! - FREE Wordpress Setup! - 24 Hour Support

Last edited by sequencehosting; 11-03-2009 at 05:28 PM.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On




All times are GMT -6. The time now is 07:05 AM.


 Subscribe to RSS

WB Sponsors

flash chat

Home Jobs Online

Search Engine Marketing

Paid Surveys

Web Design Newcastle

Bookmarking Demon 5



 Subscribe to the Website Babble Feeds

2 Create a Website Homepage | 2 Create a Website Blog


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0