SitePoint Sponsor |
|
User Tag List
Results 1 to 8 of 8
Thread: Javascript POPUP
Hybrid View
-
Aug 22, 2006, 19:18 #1
- Join Date
- Nov 2005
- Location
- Karachi - Pakistan
- Posts
- 1,134
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Javascript POPUP
Hi
I need a JAVASCRIPT Popup for 500x330. For example If i click a link, that POPUP will come and will load a HTML file. please guide
-
Aug 22, 2006, 19:27 #2
- Join Date
- Jul 2005
- Location
- West Springfield, Massachusetts
- Posts
- 17,290
- Mentioned
- 198 Post(s)
- Tagged
- 3 Thread(s)
js popup
I advise against using a pop-up unless well justified. Better to make a link with target="_blank" or better yet, let the user decide. There's a reason pop-up blockers are so popular. But if you insist you could use something like this:
window.open('url_here','name_here','parameters_here');Big Change Coming Soon - if you want your PMs save them now!
What you need to do to prepare for our migration to Discourse
A New SitePoint Forum Experience: Our Move to Discourse
-
Aug 22, 2006, 20:18 #3
Originally Posted by zeeshanhashmi
I think if you use a div with visibility false,with the required text , and on the click making the visibilty true will do the effect of as a pop up.
eg in javascript: document.getElementById("your_div_id").style.visibility="visible";
thanks
navtej
-
Aug 23, 2006, 07:38 #4
- Join Date
- Nov 2005
- Location
- Karachi - Pakistan
- Posts
- 1,134
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
wud u please let me know how to open a Specific size Windows (_blank) and POPUP ? like i want to open a window for Width = 500 and Height = 330
-
Aug 23, 2006, 08:33 #5
- Join Date
- Jul 2005
- Location
- West Springfield, Massachusetts
- Posts
- 17,290
- Mentioned
- 198 Post(s)
- Tagged
- 3 Thread(s)
window size
Using target blank opens a new browser window that the user can resize to their needs. This is best for new pages that contain text, as using specified dimensions may not be correct for a user's text-size settings. It depends on what you have in the new window. IMHO about the only justifiable reason for using a pop-up is to provide parallel comparison. That is, if you have a process that requires several screens to get through, and the user would benefit from having a seperate window with the step-by-steps. I have 1 pop-up window on my site that I use window.open() for. It's for an image that has fixed pixel dimensions. I have it open without a menubar, statusbar, or scrollbars. It's not resizable and has fixed dimensions. Generally these are qualities that make pop-ps annoying to users. If you are opening anything other than a fixed dimension image, you should provide the user those options. Come to think of it, if a user at my site decides to "zoom in" the image, they will need the resize option and/or scrollbars, time for me to change that
I have a few external links on the site where I use target="_blank" so users can see related information without losing their place. Whatever technique you use you should ensure the user is aware that a new window will open so they won't be "surpised", pleasantly or otherwise.
Big Change Coming Soon - if you want your PMs save them now!
What you need to do to prepare for our migration to Discourse
A New SitePoint Forum Experience: Our Move to Discourse
-
Aug 23, 2006, 08:44 #6
- Join Date
- Nov 2005
- Location
- Karachi - Pakistan
- Posts
- 1,134
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Actually I want to open Google map through API in the new windows and the diemention would be 500 x 330. So its fixed diemention and if user ZOOM then u know that it will not change the diemention.
-
Aug 23, 2006, 08:58 #7
- Join Date
- Jul 2005
- Location
- West Springfield, Massachusetts
- Posts
- 17,290
- Mentioned
- 198 Post(s)
- Tagged
- 3 Thread(s)
google map
Actually, I meant the browsers right-click zoom, not a google maps "zoom" feature. Using window.open for this would be OK, but I would still use resizable=yes, scrollbars=yes in the parameters just in case.
Off Topic:
BTW, I just changed my map pop-up to these a minute agoBig Change Coming Soon - if you want your PMs save them now!
What you need to do to prepare for our migration to Discourse
A New SitePoint Forum Experience: Our Move to Discourse
-
Aug 23, 2006, 09:17 #8
- Join Date
- Nov 2005
- Location
- Karachi - Pakistan
- Posts
- 1,134
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
can u give me the code to open such a window with 500x 330 plz ?
Bookmarks