PDA

View Full Version : pop ups


Tazuk
13th January 2006, 10:03
I want to a small web page that pops up when clicked on a link. The page will only have a 1 paragraph description and possibly a small picture also.

How can i do such a page, i don,t want a full page it will be too much of a waste.

Thanks

TAZ

mattk
13th January 2006, 10:38
New Window! (newWin.html)


Change newWin.html to the name of the page you want to popup - and play around with the values for:

scrollbars
resizeable
top
width
height

until you get the window looking like you want it!

Hope that helps!

Tazuk
13th January 2006, 11:17
yes it does thanks

DavidHorn
13th January 2006, 12:39
This link demonstrates a good example of creating a pop up window that doesn't rely on the javascript pseudo-protocol. Using this method you can still right click on the link to open in a new window, bookmark it, drag it to the desktop, save to favourites, etc. - it's a much more accessible method of creating pop up windows:

(originally from http://youngpup.net/2003/popups)

<a href="http://google.com/" onclick="window.open(this.href, 'popupwindow', 'width=400,height=300,scrollbars,resizable'); return false;"
>
a link that functions as a link, but opens in a new window.
</a>

openmind
13th January 2006, 12:51
Only problem is that loads of people are using SP2 for Windows XP and won't have disabled the blocker (or even know how to) plus masses of users use blockers and what not so they don't come up...

Personally I wouldn't use pop-ups unless absolutely critical....

Tazuk
13th January 2006, 12:58
Actually I was having a blonde moment and should have actually thought about the pop up blockers. I am trying to give a 1 paragraph description to a title when the title is clicked or rolled over. I don't want it on the main page because there are over 12 titles and it will take up too much room if i have that many full paragraphs on 1 page.

Any ideas please?

TAZ

mattk
13th January 2006, 12:59
This link demonstrates a good example of creating a pop up window that doesn't rely on the javascript pseudo-protocol. Using this method you can still right click on the link to open in a new window, bookmark it, drag it to the desktop, save to favourites, etc. - it's a much more accessible method of creating pop up windows:

(originally from http://youngpup.net/2003/popups)

<a href="http://google.com/" onclick="window.open(this.href, 'popupwindow', 'width=400,height=300,scrollbars,resizable'); return false;"
>
a link that functions as a link, but opens in a new window.
</a>
Isn't that exactly the code I posted 2 posts above?

Coding Monkey
13th January 2006, 13:01
It doesn't have the onclick="JavaScript:" bit. Basically

Also, I use Safari with a pop-up blocker, but if the user actually clicks on the link, it's allowed, because otherwise websites that open in new windows etc just wouldn't work.

mattk
13th January 2006, 13:05
I think you'll find that pop-op blockers don't mind window.open that is fired from an onClick. It only tends to block pop-ups that are fired from OnLoad, OnUnload and other events that are used in an underhand method!

Taz - given the above, I think you're pop up should be fine.

openmind
13th January 2006, 13:11
Fine but what happens when Google indexes the content of this new window and the user doesn't find any navigation?

Seriously reconsider it...

Tazuk
13th January 2006, 13:13
cheers for all ya help once again this forum just shows the amount help that is available from a wide variety expertise.
Thanks again
TAZ

Coding Monkey
13th January 2006, 13:17
Then you can have your links and branding included in the new window so that Google doesn't treat it as a "dangling" link

Although, many spiders can't read JavaScript, and there are more elegant methods of doing what you want

openmind
13th January 2006, 13:18
That's my point. If you're gonna have links and branding within the popup you may as well have a new page...

Back to square one... ;)

mattk
13th January 2006, 13:35
That's my point. If you're gonna have links and branding within the popup you may as well have a new page...

Back to square one... ;)
Can you kindly offer us a simple solution that a layman can apply to his site then - or are you simply offering up problems in an attempt in win some work?

openmind
13th January 2006, 13:41
That's my point. If you're gonna have links and branding within the popup you may as well have a new page...

Back to square one... ;)
Can you kindly offer us a simple solution that a layman can apply to his site then - or are you simply offering up problems in an attempt in win some work?

Jeez, where did that come from???

If I was just causing problems in order to get some work I'd I've contacted him directly!!! Can I not disagree with a point without being accused of being difficult?

To answer your question, it's quite simple if you think about it. Simply increase the amount of content so that the page doesn't look so barren. Content is king and if it something so minor that doesn't require a whole page then embed it into an existing page or use an image...

And please don't go throwing your toys about just because someone disagrees with you...

DavidHorn
13th January 2006, 14:03
Matt -

The solution I posted is similar to yours but markedly different in its function.

Mainly, it doesn't rely on the javascript pseudo protocol - so the link doesn't have 'javascript:' in it ... also, the information for the link is contained where it should be (between <a> and </a>) and not within the javascript.

Because that example I gave behaves exactly like a link, it will not be blocked by any pop up blocker.

Plus, it's a simple solution anyone can add to any of their links.

David

DuaneJackson
13th January 2006, 20:52
Go to http://www.thesocialservice.com/register.asp?1

Scroll down to near the bottom and hover on one of the 'themes'. Is this the kind of thing you are after?

Tazuk
13th January 2006, 21:53
Duane that is a much better option, i would prefer something like that.
How is it done?

TAZ

DuaneJackson
14th January 2006, 11:49
You can view the source code of the page to see exactly how it's done - it's so easy to rip off someone elses stuff from the interent. In this case it's my stuff and you have my permission : )

If you have problems getting hold of the required javascript files then just let me know and I'll send them over.

Tazuk
14th January 2006, 11:52
Would the javascript work with xhtml as i am converting my site from html with table layout to xhtml w3c css?

TAZ

DuaneJackson
14th January 2006, 11:55
Should do. You'd have to try it and see.

Tazuk
14th January 2006, 11:58
ok cheers is this javascript in one piece in the body or does it have a piece in the head also?

Srivvy
27th January 2006, 10:41
Hello Tazuk

From the point of view of getting people to visit your site, Openmind was offering very good advice.

Assuming your website has more than one page, there should always be a place for information on a normal page, rather than a pop up.

There will then be more chance of people finding you through an increase in relevant text on your site. There is rarely much benefit to favouring pop ups.

Tazuk
27th January 2006, 15:40
Thanks for the advice the pop up page is purely for a description of a title, i.e.

This course is for ..................................thats it.