popup

Can't close custom popup at fixed position

早过忘川 提交于 2019-12-24 11:27:23
问题 Here is a javascript beginners problem. I created a custom popup at fixed position(leaflet). After clicking a marker that opens the popup I can't close it by clicking the close button. I can click a different marker though , but the popup wrapper remains open showing the content attached to each different marker. So the content of the popup changes by clicking the markers but can't close the popup by clicking the close button. I tried an eventListener. I need that piece of code that does the

Showing a jQuery popup before browser window closes

淺唱寂寞╮ 提交于 2019-12-24 10:53:26
问题 I'm using the following js to show a popup before the browser/window closes. But it does not seem to be working. $(window).bind('beforeunload', function(e) { $('#beforeclose').click(); }); The popup i'm trying to show is prettyPopin . And the #beforeclose is the id of the anchor with which i'm trying to bind the click event before the window unloads. I have noticed that native js popups work but the jQuery popup does not work. Is there a way to achieve what i want to? Please do explain to me

Javascript popup in html table

▼魔方 西西 提交于 2019-12-24 10:51:40
问题 I have a 10 x 10 with data table that is created using html tags. If it is possible to create a onClick function to each cell? I mean, if I click on a cell, then it gives me its value in a n alert window? If yes, then how? 回答1: Plain JS - assuming <table id="table1"> : window.onload=function() { var cells = document.getElementById('table1').getElementsByTagName('td'); for (var i=0, n=cells.length;i<n;i++) { cells[i].onclick=function() { alert(this.innerHTML) } } } 回答2: A good example could be

How to focus on a previously opened window using window.open()

北慕城南 提交于 2019-12-24 10:07:58
问题 I would like to open a popup window for a website and keep it for a music player to be able to play seamless music while the user is navigating across pages. What I would like to achieve is that when the user first clicks the "Music" button a new popup window opens using window.open (done). The second part would be that when the user navigates to other pages and clicks again on the "Music" button then the already open window receives the focus but doesn't load again. However what is happening

Popup messages for validation

折月煮酒 提交于 2019-12-24 09:24:31
问题 I'd like to have some small popup messages appear under text fields to indicate if inputted information is incorrect like on Spring/Eclipse RCP. How can this be achieved? 回答1: IMO there are at least two ways to achieve that. You can use JGlassPane or JXLayer framework. The basic idea to draw your popup messages on the transparent layer "above" your text fields. I used the JXLayer framework because I felt it gave me a greater flexibility in what I could do. 回答2: You should probably take a look

ClientScript.RegisterClientScriptBlock not working

三世轮回 提交于 2019-12-24 09:18:39
问题 I have a popup in my page which I am trying to show on dropdownlist selected index changed event. Here is register statement ClientScript.RegisterClientScriptBlock(GetType(),"id", "ShowApplicationPopUp()",true); Here is my javascript function function ShowApplicationPopUp() { $('#NewCustomerMask').show("slow"); $('#NewCustomerApplicationPopUp').show("slow"); } Both of my divs are initially hidden by using display:none; statement. The problem is when my dropdownlist is changed the popup is not

javascript popup reloads parent page -

断了今生、忘了曾经 提交于 2019-12-24 08:47:49
问题 I have a popup function in a program that works well, be re-loads the parent page as it loads the child. Is there a way to prevent this behaviour. // popup window function function newPop(url, myWin, width, height, left, top, scrollbars) { parms = 'toolbar=yes, scrollbars=no, location=no, menubar=no, resizable=no, width= ' + width + ' , height=' + height + ' , left= ' + left + ' , top= ' + top + ' , titlebar=no , scrollbars = ' + scrollbars ; var newwin = window.open(url,myWin, parms); newwin

How to create a popup box where users can copy text?

被刻印的时光 ゝ 提交于 2019-12-24 08:15:45
问题 In my HTML page I generate a link, where users can grab to use for things. I need to somehow give the user the link where they can see the link and then copy the link to clip board. I don't mean copy to clip board through code, just manually selecting the text and clicking ctrl+c or right click+copy is ok. Is there a way I can create a popup box where it has text there that you can select and copy? This needs to work with all browsers (IE8+) (Firefox) (Chrome) (especially IE8 ). So if I use

Pop-up window from actionbar

*爱你&永不变心* 提交于 2019-12-24 03:04:40
问题 I'm trying to create a pop-up window in Android by clicking button in action bar. Like this: http://pix.am/yo2E.jpg In my idea I realised it with two fragments in one container, where 1 (pop-up) is in View.GONE state and becomes visible when I click button. Is there an easier way to solve my problem? 回答1: Basically you can do that with very small amount of code and you will end up like this but if you want to customize you have to design a custom layout To Achieve that, create a xml menu file

How to do popup on new site for 301 redirected users?

冷暖自知 提交于 2019-12-24 02:45:16
问题 I have just migrated a site to a new domain (with new design) and am redirecting from the old site to the new with .htaccess and redirect 301. Since the new site is quite different, I'm concerned that users might be disoriented. Is there a way to have a popup on the new site that users get only if they have been redirected from the old site? Have been searching on this but keywords seem to lead only to stuff on popup redirects to another site. 回答1: I can think of several ways to do it: