Helping ordinary people create extraordinary websites!

Go Back   Web Development Forum > Website Programming > Client-Side Scripting
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-07-2008, 09:15 AM
Junior Member
 
Join Date: Feb 2008
Posts: 9
Default How to create Pop up Windows

hi there,

This is Jitesh.i am creating website. i want to make pop up window.
any suggestions is most welcome.

THank you
jitesh
.Net Consulting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-07-2008, 12:28 PM
BigAlReturns's Avatar
Moderator Extraordinaire!
 
Join Date: Dec 2007
Location: The Wirral, England
Posts: 291
Send a message via MSN to BigAlReturns
Default

You can do it two ways, the first is simplest, but not guaranteed to work cross browser, as it isn't semantically correct:
<a href="popup.html" target="_blank">Pop Me Up</a>
For example, I use FF and new windows open in new tabs - this link would open in a new tab for me. The best way to do it is using javascript, and I've found a decent method shown below. Don't worry about how it works exactly, but if you're interested then I can explain:
Code:
in <head>

<script type="text/javascript">
function popup(mylink, windowname)
{
if (! window.focus) {
return true;
}
var href;
if (typeof(mylink) == 'string') {
   href=mylink;
} else {
   href=mylink.href;
}
window.open(href, windowname, 'width=400,height=200,scrollbars=yes');
return false;
}
</script>

in <body>

<a href="popup.html" onClick="return popup(this, 'WIndow Title)">Pop Me Up</a>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-07-2008, 05:00 PM
ryanhellyer's Avatar
Super Moderator
 
Join Date: Dec 2007
Posts: 708
Default

BigAl, do you know how to make those annoying pop-ups which automatically appear even when you don't ask for them? I have use for them on a site I'm working on at the moment.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-07-2008, 06:16 PM
BigAlReturns's Avatar
Moderator Extraordinaire!
 
Join Date: Dec 2007
Location: The Wirral, England
Posts: 291
Send a message via MSN to BigAlReturns
Default

Not entirely certain to be honest - if you can find an example of a site that does it though, I'll probably be able to dig through the source code and work something out for you.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-08-2008, 04:04 AM
Junior Member
 
Join Date: Feb 2008
Posts: 9
Default Creatinf Pop up Windows

HI there,

I really Thank BigAlReturns and ryanhellyer for sharing your views with me.
i did saw the Pop windows in one of the website. just follow the following url.

http://www.webforumz.com/graphics-fo...and-banner.htm

In the above given link,just scroll to the fourth post, there you will find a hyper linked word " reading " powers have left us... if you place mouse on it you will
find something. i wanted to do the same on my site.
hoping help from you all..

Thank you
Jitesh
__________________
Programmer
.Net Consulting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-08-2008, 07:14 AM
ryanhellyer's Avatar
Super Moderator
 
Join Date: Dec 2007
Posts: 708
Default

This isn't done with client side scripting so I've posted a new topic along with an explanation of how it works over in the HTML/CSS forum ... http://forums.developertutorials.com...=3209#post3209

Let me know if you have any trouble understanding how it works and I'll track to come up with a better explanation/more complicated demo.

EDIT: I realised after I made my next post that it actually was made via client side scripting, but my post explains an alternative (and usually more appropriate) way of creating them.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-08-2008, 11:48 AM
BigAlReturns's Avatar
Moderator Extraordinaire!
 
Join Date: Dec 2007
Location: The Wirral, England
Posts: 291
Send a message via MSN to BigAlReturns
Default

Quote:
Originally Posted by dilipv View Post
HI there,

I really Thank BigAlReturns and ryanhellyer for sharing your views with me.
i did saw the Pop windows in one of the website. just follow the following url.

http://www.webforumz.com/graphics-fo...and-banner.htm

In the above given link,just scroll to the fourth post, there you will find a hyper linked word " reading " powers have left us... if you place mouse on it you will
find something. i wanted to do the same on my site.
hoping help from you all..

Thank you
Jitesh
These are a form of advertising done by some 3rd party companies - if you want to use them then sign up as a publisher at one of their sites. They will give you a small bit of javascript to put into your pages and then the rest will happen automatically. In the case of the page you linked, the ad company is Kontera. I think AdBrite also do this sort of advertising, and probably many others.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-12-2008, 04:53 AM
Junior Member
 
Join Date: Feb 2008
Posts: 9
Default

hi there,

Thank you for your suggestions but i am concerned regarding the Menus only.i am searching for the building the menus built in CSS or in Javascript.to make my site light in size.

Thank you
Jitesh
__________________
Programmer
.Net Consulting
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
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

vB 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 -5. The time now is 05:39 AM.


Website Design by Ducani Media Group
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.