popup

Using javascript to print images

萝らか妹 提交于 2019-11-27 12:11:26
I would like to know if it's possible to use javascript to open a popup window containing an image, and at the same time have the print dialog show. Once someone clicks on print, the popup closes. Is this easily attainable? Javier Parra popup = window.open(); popup.document.write("imagehtml"); popup.focus(); //required for IE popup.print(); ricardo_escovar Another great solution!! All credit goes to Codescratcher <script> function ImagetoPrint(source) { return "<html><head><scri"+"pt>function step1(){\n" + "setTimeout('step2()', 10);}\n" + "function step2(){window.print();window.close()}\n" +

How can you create pop up messages in a batch script?

旧时模样 提交于 2019-11-27 12:03:23
I need to know how to make popup messages in batch scripts without using VBScript or KiXtart or any other external scripting/programming language. I have zero clue about this... had no starting point even. I am aware of NET SEND but the Messenger service is disabled in my current environment. With regard to LittleBobbyTable's answer - NET SEND does not work on Vista or Windows 7. It has been replaced by MSG.EXE There is a crude solution that works on all versions of Windows - A crude popup message can be sent by STARTing a new cmd.exe window that closes once a key is pressed. start "" cmd /c

Why is Chrome showing a “Please Fill Out this Field” tooltip on empty fields?

喜欢而已 提交于 2019-11-27 12:00:49
I was contacted by my client saying that users complaint saying that some fields now show a tooltip with a message "Please Fill out This Field". I couldn't believe what I heard... but the client is right - using latest Chrome version some fields show a browser tooltip with this message even side by side with my validators! What's the problem? What am I missing? Thanks. EDIT: The HTML generated by my user control is as follows: <input name="tbMontante" type="text" maxlength="8" size="10" tbMontante" class="Montantetextfield" FieldName="Montante" Required="True" AllowDecimalValues="True" /> EDIT

How to open a jQuery Mobile Dialog from javascript?

会有一股神秘感。 提交于 2019-11-27 11:57:58
问题 I have a dialog page and am trying to open it and display results from an AJAX POST. Here is my jQuery success event: success: function(resp) { $("#dialog").dialog(); $("#text").html('SPAM and EGGS!') } My HTML has two pages, the second being the dialog html: <div data-role="page" id="main"> # content </div> <div data-role="page" id="dialog"> <div data-role="header"> <h1>Your Message</h1> </div> <div data-role="content" id="text"> </div> </div> My AJAX POST is working and element id="text" is

How to add konami code in a website based on html?

拜拜、爱过 提交于 2019-11-27 11:46:34
问题 I was asked to implement the Konami Code in a website I'm currently working on. It should do the following: Change Background Image Play sound Bring some pop-up What's the easiest way to achieve this using javascript? 回答1: Place the code below in a file js/konami.js and reference it in the body of your html file like this: <script src="js/konami.js"></script> // a key map of allowed keys var allowedKeys = { 37: 'left', 38: 'up', 39: 'right', 40: 'down', 65: 'a', 66: 'b' }; // the 'official'

Change background of EditText's error message

半世苍凉 提交于 2019-11-27 11:34:27
What I want to do is change the background color (set custom drawable) of a popup error message displayed after using setError() method. Currently, it looks like this: I've found that Android has two files: popup_inline_error.9.png popup_inline_above_error.9.png And you're supposed to be able to set them using two attributes: errorMessageBackground errorMessageAboveBackground But when I try to set them in my theme, all I get is: <item name="errorMessageBackground">@drawable/popup_inline_error_holo_light</item> <item name="errorMessageAboveBackground">@drawable/popup_inline_error_above_holo

How to do window.open with no scrollbars in Google Chrome

坚强是说给别人听的谎言 提交于 2019-11-27 11:19:51
问题 The following code opens the new window without scrollbars in Firefox, IE and Opera. var options = { height: 300, // sets the height in pixels of the window. width: 300, // sets the width in pixels of the window. toolbar: 0, // determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}. scrollbars: 0, // determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}. status: 0, // whether a status line appears at the bottom of the window {1

Android: create a popup that has multiple selection options

梦想的初衷 提交于 2019-11-27 11:16:26
I've been searching around trying to figure out how to create a popup or a dialog that has 4 options to choose from. I see this picture on the Android developer site: Does anyone know how to code up something like the one on the right? I don't need any icons next to my text, I just need to be able to select from 4 options. zbr You can create a CharSequence array with the options you want to show there and then pass the array to an AlertDialog.Builder with the method setItems(CharSequence[], DialogInterface.OnClickListener) . An example: String[] colors = {"red", "green", "blue", "black"};

Drag WPF Popup control

时光怂恿深爱的人放手 提交于 2019-11-27 11:15:42
问题 the WPF Popup control is nice, but somewhat limited in my opinion. is there a way to "drag" a popup around when it is opened (like with the DragMove() method of windows)? can this be done without big problems or do i have to write a substitute for the popup class myself? thanks 回答1: Here's a simple solution using a Thumb. Subclass Popup in XAML and codebehind Add a Thumb with width/height set to 0 (this could also be done in XAML) Listen for MouseDown events on the Popup and raise the same

Submit a form in a popup, and then close the popup

回眸只為那壹抹淺笑 提交于 2019-11-27 10:36:16
问题 This seemed so trivial when I started off with it! My objective is this: When user clicks on a button, open up a form in a new window. Once the form is submitted, close the popup and return to the original page. The reverse order is fine too - i.e., I am okay if the popup is closed and then the form submits. Here's how I'm doing this: <form action="/system/wpacert" method="post" enctype="multipart/form-data" onsubmit="return closeSelf()" name="certform"> <div>Certificate 1: <input type="file"