browser

Make PDF display inline instead of separate Acrobat Reader window

微笑、不失礼 提交于 2019-12-29 06:18:15
问题 I've got an ASP.NET ashx class that retrieves data from a database, creates a PDF file using iTextSharp, and streams the PDF to the browser. The browser (IE and Firefox at least) is launching Acrobat Reader as a separate window to open the file. I'd like for it to display inline within the browser. Is that something I can completely control from the server side? I'm already setting the Content-Type header to application/pdf, and I've tried setting Content-Disposition and Content-Length.

Change timezone of browser [duplicate]

半城伤御伤魂 提交于 2019-12-29 04:41:04
问题 This question already has answers here : How to use a custom time in browser to test for client vs server time difference (7 answers) Closed last year . I need to run browser with a timezone other than operating system's time zone. Is there any way to customize time zone in any browser or is there any plugin available that provides such functionality? 回答1: If you are on Linux, you can launch a process while setting an environment variable for the lifetime of the process. Linux uses the

View and change sessions variables in a browser

一个人想着一个人 提交于 2019-12-29 04:34:05
问题 Debugging a PHP program, is there any add-on/plug-in for browser which I can view sessions variables (those PHP $_SESSION["foobar"] )? Best if I can change the value in the variables. 回答1: There is no way to manipulate the values stored in sessions from the client side. That's one of the main reasons you'd use a session over a cookie - YOU control the data. With cookies, the user can manipulate the data. The only way to access/manipulate session data from the client side would be with an Ajax

How to listen for Ctrl-P key press in JavaScript?

会有一股神秘感。 提交于 2019-12-29 04:30:34
问题 I want to disable print for some webpages. How to wireup cross browser hotkeys (Cntrl + P) to a javascript that will be fired whenever hotkeys are pressed? 回答1: You can override by capturing the event. jQuery(document).bind("keyup keydown", function(e){ if(e.ctrlKey && e.keyCode == 80){ return false; } }); 回答2: Also a great library is Mousetrap 回答3: Try Keyboard Shortcuts Library. Instead of just copy pasting it let's havea look at the source and understand how it works. You can see the

Android Download Intent

孤者浪人 提交于 2019-12-29 04:28:09
问题 I was wondering what is the intent for downloading URLs? In the browser, it will download stuff with a little notification icon. I was wondering if I can use that intent (and what it is). 回答1: Applications can download files with the download manager just like the browser and gmail. This is available starting with Gingerbread. Your app needs the INTERNET permission to initiate a download. To save the file in the default Download directory it also needs the WRITE_EXTERNAL_STORAGE permission.

How do I make TWebBrowser keep running JavaScript after an error?

守給你的承諾、 提交于 2019-12-29 04:20:07
问题 I'm having some troubles with javascript error handling in WebBrowser on Delphi 2010. I'm using WebBrowser with enabled silent property. Seems OK, but there is one issue on sites with buggy scripts: it seems like part of script after error doesn't executes. Results of some script slightly differs from IE. Do you have any idea how this issue can be solved? 回答1: You can use the IOleCommandTarget and in its IOleCommandTarget.Exec method catch the OLECMDID_SHOWSCRIPTERROR command. In the

browser autocomplete/saved form not work in ajax request

坚强是说给别人听的谎言 提交于 2019-12-29 03:27:26
问题 Its really hard to search the any combination of keywords in search engine about this because it used by most popular developer wanted a custom autocomplete by ajax. Most developer search about the custom autocomplete to get result from db by ajax or about how to disable browser autocomplete due to security reason or they wantted to use another autocomplete extender. However I am not talking about the autocomplete. I finding about simple normal browser autocomplete or browser saved form

Converting WebBrowser.Document To A Bitmap?

狂风中的少年 提交于 2019-12-29 03:21:32
问题 Is it possible to draw a WebBrowser.Document to a Bitmap? Basically taking a screenshot of a WebBrowser control (note, this is with a WebBrowser that doesn't live on a form, but just in code). WebBrowser w = new WebBrowser(); w.Document = "<b>Hello</b> world."; w.Document.DrawToBitmap ??? Thanks! 回答1: http://www.bryancook.net/2006/03/screen-capture-for-invisible-windows.html and here: http://www.codeproject.com/KB/graphics/screen_capturing.aspx I believe you should get the handle of your

How to change the default Android browser's homepage within an app?

℡╲_俬逩灬. 提交于 2019-12-29 01:11:51
问题 Within my app, is it possible to programatically change the Android browser's homepage url? If so, how can I accomplish this? For example, if you run this popular app with Android 2.3 (all that I've tested), it will change your homepage to http://www.searchmobileonline.com -- https://market.android.com/details?id=goldenshorestechnologies.brightestflashlight.free Thanks! 回答1: I did not try this myself, but BrowserSettings has a public interface setHomePage: public void setHomePage(Context

Can you detect “Tablet Mode” in Edge and IE11 using JavaScript on Windows 10?

让人想犯罪 __ 提交于 2019-12-29 00:39:14
问题 I am thinking of making my UI to dynamically change to a more touch-friendly layout when the user switches "Tablet Mode" on, and switch back to our "desktop" layout if they turn Tablet Mode off. That requires (1) detecting tablet mode in JavaScript (2) detecting the on/off change of tablet mode. I prefer pure JavaScript and DOM (not jQuery, Modernizr etc). Reason: We have a high density (desktop like) user interface, which we can't easily just change. I wish to add spacing to be more touch