Site Reference Forums

You are not logged in.

#1 2008-02-29 23:04:49

matte
Administrator
From: you know you want a caricature
Registered: 2004-11-08
Posts: 3275
I've been thanked 28 times.

Thank me Website
Buy me a beer

horribly basic question - size specified new window

What I am wanting to do is to be able to open a page ina  new window, that has the size, and if possible, the location on screen specified.
I'd prefer NOT javascript, and i seems to remember doing it in html once...think I can remember - nup!

So a html or css trick for it would be appreciated
Matte

Offline

 

#2 2008-03-01 00:22:38

ColoEagle
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2109
I've been thanked 83 times.

Thank me Website
Buy me candy

Re: horribly basic question - size specified new window

Are you looking for a link or mouseover pop up window or where it opens a completely new window?


The only way to discover the limits of the possible is to go beyond them into the impossible
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems

Offline

 

#3 2008-03-01 00:47:24

matte
Administrator
From: you know you want a caricature
Registered: 2004-11-08
Posts: 3275
I've been thanked 28 times.

Thank me Website
Buy me a beer

Re: horribly basic question - size specified new window

link please - I am hoping to be able to place the new window at upper right of the screen as well - all without JS if possible. Why - I'm too lazy to put the extra link on all the pages blinka

Offline

 

#4 2008-03-01 01:35:17

ColoEagle
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2109
I've been thanked 83 times.

Thank me Website
Buy me candy

Re: horribly basic question - size specified new window

Well I would have to do more playing around to eliminate the js completely. but how about a setup that doesn't require a js file?

Just two short snippets of js that are included in the link set up.

Code:

The CSS;
.popup a {text-decoration:underline;cursor:pointer;}
#box {display:none; position:absolute; left:200px; top:150px; border:solid black 1px; padding:10px; background-color:yellow;width:150px;}

The HTML;
<div class="popup">
<p><a onclick="document.getElementById('box').style.display = 'block' " >Click here</a></p>
<div id="box">
<p>This is a CSS Popup with a small amount of JS that you can position anywhere you want on the page, set the height and width. It can contain any text, links and images you want.</p>
<p style="text-align:right;"><a onfocus='this.blur();' onclick="document.getElementById('box').style.display = 'none' " >Close</a></p>
</div>
</div>

Went ahead and worked up one for mouseover of a link.

Code:

The CSS;
.linkpopup span {display:none;}
.linkpopup:hover .box {display:block; width:150px; padding:10px; background-color:yellow; position:absolute; left:200px; top:150px; border:solid black 1px;}
.box {text-decoration:none;}

The HTML;
<p><a class="linkpopup" href="#nogo">A Pop-up!!<span class="box">This is a CSS Popup on mouseover that can be positioned anywhere you want on the page and can contain text and images but not links.</span></a></p>

Hope this helps, will be back tomorrow evening. Beddy bye time as it's now midnight thirty.


The only way to discover the limits of the possible is to go beyond them into the impossible
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems

Offline

 

#5 2008-03-01 06:54:28

matte
Administrator
From: you know you want a caricature
Registered: 2004-11-08
Posts: 3275
I've been thanked 28 times.

Thank me Website
Buy me a beer

Re: horribly basic question - size specified new window

hmmm - where do you reference the page that is opened?

Offline

 

#6 2008-03-01 08:49:29

ColoEagle
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2109
I've been thanked 83 times.

Thank me Website
Buy me candy

Re: horribly basic question - size specified new window

With the first, anything inside the "div id="box" will appear in the popup. Clicking on the words "click here" will bring up the box

With the second, anything inside the span class="box" will appear in the popup. Mousing over the words "A Popup" will show the box


The only way to discover the limits of the possible is to go beyond them into the impossible
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems

Offline

 

#7 2008-03-01 17:45:40

matte
Administrator
From: you know you want a caricature
Registered: 2004-11-08
Posts: 3275
I've been thanked 28 times.

Thank me Website
Buy me a beer

Re: horribly basic question - size specified new window

ah, yes I had missed something there and see how it works big_smile

next question - how to have a url destination display in the box. This is the sort of thing I want to show
http://www.polyphoniconline.com/test3/

Also on some ocassions this link will be in the nav menu (that you helped me with before)

Offline

 

#8 2008-03-01 21:40:12

matte
Administrator
From: you know you want a caricature
Registered: 2004-11-08
Posts: 3275
I've been thanked 28 times.

Thank me Website
Buy me a beer

Re: horribly basic question - size specified new window

I'll probably go JS I think....

Offline

 

#9 2008-03-01 21:50:13

ColoEagle
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2109
I've been thanked 83 times.

Thank me Website
Buy me candy

Re: horribly basic question - size specified new window

Didn't leave you hanging Matte, just got home from a day at our local Home & Garden Show

So you are wanting to recreate this page without the flash. Can be done but will take a little more coding differently from the above.

I'll go through my snippets from the welcome to the community site as I had done something similar to this page and then didn't use it.


The only way to discover the limits of the possible is to go beyond them into the impossible
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems

Offline

 

#10 2008-03-01 23:57:44

matte
Administrator
From: you know you want a caricature
Registered: 2004-11-08
Posts: 3275
I've been thanked 28 times.

Thank me Website
Buy me a beer

Re: horribly basic question - size specified new window

the destination page is fine - I have settled on flash for that - basically because it is sooo easy to do.

Its getting that page to open in a smallish window, without scroll bars etc and located in upper left.

I have some JS that will do that ...

Offline

 

#11 2008-03-02 00:41:30

ColoEagle
Administrator
From: Colorado, USA
Registered: 2006-02-15
Posts: 2109
I've been thanked 83 times.

Thank me Website
Buy me candy

Re: horribly basic question - size specified new window

ok, got ya now.

Doing that without JS, I would have to say no. Course someone else may know of a way to do it.


The only way to discover the limits of the possible is to go beyond them into the impossible
Attention designers and webmasters - "The Beauty of CSS"
Valid Web Designs tutorials on HTML, XHTML and CSS
Home Security Systems

Offline

 

#12 2008-03-03 12:46:57

Northie
Moderator
From: Yorkshire, UK
Registered: 2006-08-19
Posts: 2578
I've been thanked 62 times.

Thank me Website
Buy me a beer

Re: horribly basic question - size specified new window

The window object is the highest DOM level there is, and if it's DOM modification you want then it's gonna have to be javascript

Searching google for javascript window object bought this page up at #1

http://www.comptechdoc.org/independent/ … indow.html

See the bit about open (under the "Window Object Methods" section)

guessing you could try this:

Code: html

<a href='#' onclick="window.open('/new-page.htm','my new window','width=640',height=480'); return false;">Click Here</a>

Now taking free-lance inquiries; Please contact me for more details
Xeneco - My Internet Ramblings
Web 20 - Web Apps
Nothing's Impossible, just let me think about it for a while....

Offline

 

#13 2008-03-04 00:03:01

matte
Administrator
From: you know you want a caricature
Registered: 2004-11-08
Posts: 3275
I've been thanked 28 times.

Thank me Website
Buy me a beer

Re: horribly basic question - size specified new window

yes JS it needed to be, per other thread with the implementation as a trial

Offline

 
Never
Sponsored Results


Board footer

Powered by PunBB
© Copyright 2002–2008 Rickard Andersson