popup

jQuery Mobile popup content height exceeds window height

左心房为你撑大大i 提交于 2019-12-06 07:35:06
问题 The jQuery Mobile popup dimensions are limited to having a 15px margin on the left an right sides, and a 30px margin on the top and bottom. If the content is too large for these constraints, then the popup grows longer (not wider), so that the whole page must be scrolled to view the popup content. I need to change this behavior such that the popup dimensions never exceed the height of the window, and such that the content scrolls vertically within the popup. It is possible to limit the size

How to add errormessages instead of alert boxes in pop up using javascript

喜夏-厌秋 提交于 2019-12-06 07:21:53
I need to validate the date format in textbox inside popup using JavaScript. Instead of using alert boxes , I need to display the error messages similar to document.getElementById("MainContent_ErrorMsg").innerHTML = "Please Enter valid date" . Is there any other method to achieve this behavior? My JavaScript code is: var startdate = document.getElementById("MainContent_uscEventParameters_txtEarliestStartDate"); var enddate = document.getElementById("MainContent_uscEventParameters_txtLatestEndDate"); var validformat=/^\d{4}\-\d{2}\-\d{2}$/; if (! (startdate.value.match(validformat)) && (enddate

Leaflet popup.update() Resizing Solution - Recreating a Popup Everytime, Unable to Click Embedded URL

人盡茶涼 提交于 2019-12-06 06:52:16
I applied a popup.update() code snippet provided by @ghybs that works very well to adjust the popup to fit within the frame of the map, as you can see the code here: document.querySelector(".leaflet-popup-pane").addEventListener("load", function (event) { var tagName = event.target.tagName, popup = map._popup; console.log("got load event from " + tagName); if (tagName === "IMG" && popup) { popup.update(); } }, true); The problem is that I embedded a url in the thumbnail for each popup. When I go to click on the thumbnail, the cursor indicates that a 'click' should be possible, but it does not

jquery click on href link - have to click twice

牧云@^-^@ 提交于 2019-12-06 06:39:44
The function works, but the popup will open only after the button is clicked twice (and then, subsequent clicks get the action on the first click). $(document).ready(function(){ $('a#printPosBtn').on('click', function(e) { e.preventDefault(); $('.printPopup').popupWindow({ centerBrowser:1, height:500, width:720, scrollbars: 1, resizable: 1 }); return false; }); }); What's wrong? I think that is because you are actually initialising the plugin within the click handler. From a quick skim through the popupWindow docs it appears that the plugin takes care of binding a click handler for you, which

ANDROID: How can I launch a popup dialog from an notification or long-pressed search button on top of all windows?

北城以北 提交于 2019-12-06 06:30:37
问题 I have searched and everything is about launching an activity not a dialog. What I want to do is to display a notification in the status bar, and when the user presses it a dialog pops up on top of whatever the user was viewing before s/he clicked the notification. I dont want the dialog to show on top of the main activity or the recent apps list. Also, how can i launch the dialog from long pressing the search button? Thanks! 回答1: I'm copying from here: Here is answer to Start activity as

Open new window on center of screen with this javascript?

雨燕双飞 提交于 2019-12-06 06:08:08
My experience with javascript is extraordinarily limited. I would like to have the new window open up in the center of the screen. <script type="text/javascript"> function fbs_click() { var twtTitle = document.title; var twtUrl = location.href; var maxLength = 140 - (twtUrl.length + 1); if (twtTitle.length > maxLength) { twtTitle = twtTitle.substr(0, (maxLength - 3)) + '...'; } var twtLink = 'http://twitter.com/home?status=' + encodeURIComponent(twtTitle + ' ' + twtUrl); window.open(twtLink,'','width=300,height=300'); } </script> If somebody can please update my code to accomplish a popup

Opening javascript popup window without address bar and title with height and width set in percentage according to screen resolution

和自甴很熟 提交于 2019-12-06 05:58:09
I want to open popup window using javascript with no title and address bar and also want to set its height and width in percentage according to screen resolution.How can i achieve this. I did this code; function popitup(url) { LeftPosition = (screen.width) ? (screen.width - 800) / 2 : 0; TopPosition = (screen.height) ? (screen.height - 700) / 2 : 0; var sheight = (screen.height) * 0.9; var swidth = (screen.width) * 0.8; settings = 'height='+ sheight + ',width='+ swidth + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=yes,resizable=yes,toolbar=no,status=no,menu=no, directories

Popups in jQuery Mobile not working as intended, please advice

心不动则不痛 提交于 2019-12-06 05:54:11
问题 Popups in jQuery Mobile not working as intended, please advice. The popup DIV is still visible,one would expect that DIV to be hidden and it doesnt popup when the link is clicked.It seems to work in the demos in jQuery docs. Is something wrong with the code below? <a href="#transitionExample" data-transition="pop" data-role="button" data-inline="true" data-rel="popup">Pop Up</a> <div data-role="popup" id="transitionExample"> This is a POP UP. </div> 回答1: HTML <p>You have entered: <span id=

Create window popup with custom content instead of url?

梦想的初衷 提交于 2019-12-06 05:30:10
Any one let me give an idea of implementing the window popup and accessing the js variable of parent window to popup window with custom content. <div id="modeltext" style="display:none"> <p id="linker" ></p> <script type="text/javascript"> var news = "http://google.com"; jQuery(document).ready(function() { jQuery('#linker').html("<a href="+news+">"+news+"</a>"); }); </script> This is for testing according to the concept. </div> <a href="#" id="testing" >Open a popup window</a> JS: jQuery('#testing').click(function() { var w = window.open($('', "", "width=600, height=400, scrollbars=yes"));

Display popup only once per visit

ぐ巨炮叔叔 提交于 2019-12-06 04:30:37
I want to show popup just once per session which expire after some time. Can someone help me? function PopUp(){ $('.home-popup').fadeIn(500); } setTimeout(function(){ PopUp(); },1000); // 1000 to load it after 1 second from page load $('.close-popup-btn').click(function() { $('.popup').fadeOut(300); }); You could use localstorage for this as well. To set a storage item: localStorage.setItem('myPopup','true'); and to check for it you could do something like this: var poppy = localStorage.getItem('myPopup'); if(!poppy){ function PopUp(){ $('.home-popup').fadeIn(500); } setTimeout(function(){