Closing A DHTML "popup"
Jun 21, 2005
I'm trying to design my own color-picker pallette (like Photoshop or something) for use on my website (I'm not pleased with any of the ones out there already), but I can't figure out how to make the pallette close if I click anywhere on the document except on the pallette.
The pallette "pops up" (I'm actually just changing the display of a div holding a color table from 'none' to 'block') when the user clicks on an icon of a pallette. They can mouseover the colors to see their hex code and a sample, and clicking on a color chooses it, makes the necessary changes on the page, and closes the pallette. However, I would appreciate some help with getting the pallete to close (change the display from 'block' to 'none' again) when the user clicks on the document outside of the pallette.
View 1 Replies
ADVERTISEMENT
Jul 20, 2009
The rollover menu's roll out nicely, but they don't go back in unless you put your mouse over another menu item. Is there another onmouse* combination I should be using?My javascript:
Code:
// JavaScript Document
var retardo;
[code]....
View 1 Replies
View Related
Dec 25, 2011
From a parent window, I open two child windows.In the second child, you complete some data, and then it closes the window. I'm trying to figure out how to find and close the first popup window at the same time (as that is used for reference but no action necessary on it).As near as I can tell window.open should let me set a handle that I can then reference later on to close that window (or am I misunderstanding that), but i cannot figure out how to reference that window.
View 1 Replies
View Related
Jul 23, 2005
I need some help with closing a popup window. I'm making an online portfolio,
that has one base page with text and thumbnails. When a user clicks on a thumb,
a new window opens containing a larger image and a caption (each contained on a
separate htm document). I do this with a function in the header script as follows:
var picpage=" ";
var params=" ";
function fullpicwin(picpage,params)
{
window.status="Opening picture... please wait";
window.open(picpage,'fullpic',params)
}
picpage (the name of the htm file), and params (window size, etc.) are passed
from the click code by each thumb. Each popup is sized differently, of course,
based on the side of the larger photo. All controls, etc., in the popup are
turned off. The user can click the "x" box or a form button at the bottom of
the popup to close the window.
All this works very nicely... EXCEPT...
The user can move the mouse back to the main page and open ANOTHER popup by
clicking on another thumb BEFORE closing the existing popup. The problem is the
2nd popup retains the size of the first, so of course the photo may be blocked
by the borders, etc.
What I want to do is force the closing of the first popup if the user tries to
open a 2nd and so on. There is no reason to have more than one large photo
showing at the same time.
I thought I could put some code in the function that checks for the existence
of a window named "fullpic", and if it's there, closes it first, then opens
another. But I can't seem to get the syntax right.
View 1 Replies
View Related
Feb 10, 2011
I have a lightbox pop up on my homepage. I'm curious if there's a way to automatically close the pop up after 5 seconds or so.
For some readon onClose kept popping in my head, but I'm pretty sure that's not correct.
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
[Code]....
View 1 Replies
View Related
Oct 14, 2006
I'm trying to create a popup using DHTML (absolutely positioned DIV). The problem is when I use innerHTML to put the image inside my popup, in IE 6 the image usually doesn't show. Sometimes it does after trying the same popup multiple times, but most often the popup shows up blank, and I have to right-click the image and then select "Show Image" to actually display the image. This only happens in IE6, it works fine in IE7 or any other browser. Do you guys know of any trick that I'm missing here? You can see what I mean here: Code:
View 2 Replies
View Related
Aug 21, 2009
How could I open a page/popup after closing one? The objective is to log the user out if they haven't Logged out or clicked Logout.
I am sure there is a simple way to do this. None of my ideas work.
The only answer I could come with (after testing the whole day...) IE(any version), Firefox, and other browsers don't support this idea, due to the fact that the user clicked close and you can't impose things on them.
View 21 Replies
View Related
May 21, 2010
I am calling a Java Script function on the button click of a pop up window (ASP.net). The function does the following:
1. Close the Popup window
2. Call JS function on the Parent window
3. Try to open another popup
I am able to close the popup window and call the js function on the parent window but I am not able to open the new window.
CODE:
window.close();
window.opener.clearfields();
window.open('MyExcel.xls');
I need to perform all these in one JS function.
View 2 Replies
View Related
Nov 9, 2003
I have spent the whole of last night looking for a reliable javascript that pops up a small (possibly centered) window when the user exits the site (for another site) and for when he/she closes the site's main window.
Has anybody come across or is aware of a script that does all the above?
View 3 Replies
View Related
Nov 4, 2002
Been on the lookout for a DHTML tool top style layer popup script that follows the mouse around the screen. I'd seen iton a page last week and someone asked me about it today and I couldnt find it (Google / DynamicDrive etc).
View 2 Replies
View Related
Jul 20, 2005
I want to close a popup-window with the onBlur eventHandler.
function closeIt() {
setTimeout('window.close()',2000); }
<body onBlur="closeIt()">
html
</body>
There is a form on my page, and when a input-field gets focus, body looses focus and the window closes. That's not what I want. I want to close the window, if focus goes to another
window or application, but not when someone tries to fill that form.
View 2 Replies
View Related
Aug 4, 2011
when i closing popup div on firefox 3 not work well,and this my script for reload parent :
window.location.reload();
it work on firefox 4 but on firefox 3, it doesn't work well...
View 2 Replies
View Related
Aug 18, 2010
I have a starting page, Page1.php that uses Page1.js.In Page1.js, I'm using the onclick event for a button that's on that page. When the button is clicked, it goes to Page2.php. Okay, fine.Page2.php is using Page2.js. But when the browser switches to page 2, I get a javascript error because, somehow, it's still referencing the Page1.js file. (Using IE8)So how do I 'dereference' the first javascript file, so that when Page2 loads, it doesn't still try to instantiate the objects in Page1.js? (I'm getting a null object error when Page2.php loads).
View 3 Replies
View Related
Oct 22, 2001
here's a question. Can anybody outline the primary advantages and disadvantages and differences between javascript and DHTML.
View 3 Replies
View Related
Jan 22, 2010
I am trying to dynamically open a popup window but ie8 blocks it with the popup blocker. basically within a ajax fuction I have a confirm button and if the user clicks yes it opens a popup window. now I tried it with a javascript function but it got blocked, so I have tried it by creating a form with a button in it and instead of calling the popup function direct I call document.form.button.click and in the form my button has onclick"popup('<? echo url; ?>')" but this also is detected as a unwarranted popup and is blocked.
now I understand that the popup blocker works when a popup is called without user interaction, but allows popups on say button clicks. how can I get the popup to work
View 3 Replies
View Related
Jun 4, 2009
1. VBScript opens a dropmenu: oPopUp = window.createPopup
2. Then Javascript code in the popup body should hide the popup when certain item has mouseover.
Can javascript hide vbscript popup (within the popup)?
View 3 Replies
View Related
Sep 22, 2010
In my application i use window.showmodaldialog() to pop up a window. When i run it in IE pop up blocker wont blocks the window... But when run it in FireFox pop up blocker will blocks the pop up window.. is there any way to open a window with out blocking(avoiding ) by the pop up blocker?
View 1 Replies
View Related
Jul 11, 2011
I want to configure the script below to popup only once per browser session. I know nothing about javascript.
Code:
View 3 Replies
View Related
Nov 24, 2006
All I want to do is to have a div slide down from underneath a button I have. When i search online, I find a zillion slide down menu scripts, but they don't work for just
sliding a div.
View 4 Replies
View Related
Jul 20, 2005
I've copied some code from a book which will enable me to make a layer
around a page, my aim is to do something a little more complex but this I
thought would get me started.
Anyway, I've run into a problem before I even start! The script works OK, it
runs the image in from the left hand side quite nicely, great. Problem I
have it always scrolls up to the top of the page, when the link I click
maybe 2 or 3 screens below (does that make sence?). I thought if I was to
add a name attribute to the link I could get the co-ordinates of this and
the screen will not reposition. Code:
View 3 Replies
View Related
Jul 26, 2011
My pages all have the same blank at start then the images slide up trick. I have an old workaround for IE that stopped working, and I don't know what to do. In IE now nothing shows up.
View 1 Replies
View Related
Aug 23, 2009
What is the difference between DOM, Javascript and DHTML?
Alert() and document.write() is a DOM method or Javascript method?
View 6 Replies
View Related
Aug 31, 2003
So I need to use variables passed in the url for dhtml calculations.
View 3 Replies
View Related
Jan 2, 2004
Here goes:
I'm looking for a particular dhtml content scroller that is will slide to different sections of the content when a link is clicked.
Imagine a long table with all the pages of content on it side by side and a layer is placed over that table so that when a link is clicked the desired content will slide into view.
Its a very common effect used in flash sites but im wondering if anyone knew how to do it using dhtml.
View 2 Replies
View Related
Apr 20, 2004
I have a form that will display either text boxes to edit a start and end date or just display nothing depending on the selection from a <select>. I am using JavaScript and DHTML to accomplish this and the code below works fine. When the page loads my <select> will have a value already.
My question is how do I get the correct block of code to show up when the page loads depending on what is already selected? I can't use an onLoad in the body tag because I am unable to edit the body tag. Code:
View 2 Replies
View Related
Jan 13, 2005
I've got a good cross browser dhtml fade in script that shows random images from an array when the window loads. It works perfectly for that.
I'd like to alter the code to show when the window loads the 'entire slideshow' over and over in a loop. I'm very new to JavaScript and could use a bit of help or advice on how to implement this. My coding knowledge is very basic. Code:
View 8 Replies
View Related