browser

C# WebBrowser Button Click, then go to another page

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 11:03:57
问题 I need to click an html button and navigate to another page. After click I need to wait for page loading, and go to the new page only when the old page loaded. Here is the code, that click a button: element = webBrowser1.Document.GetElementById("LoginButton"); element.InvokeMember("click"); webBrowser has got a IsBusy property, but it don`t works after button click: element = webBrowser1.Document.GetElementById("LoginButton"); element.InvokeMember("click"); if(webBrowser1.IsBusy) { MessageBox

Java “Browser Freeze” While Loading

这一生的挚爱 提交于 2019-12-24 10:49:03
问题 OK this problem has been bugging me for so long. Basically I made a signed Java applet that downloads a video from an url. The part of the code which calls the applet is below: <?php if(!empty($id)){ echo <<< END <object codetype="application/x-java-applet" type="application/x-java-applet" code="downloader.class" archive="downloader.jar" height="0" width="0" align="center" cache_archive="downloader.jar" initial_focus="true"> <param name="v" value="$id"/> <param name="u" value="$id"/> <param

Popular browsers on the Mac [closed]

别说谁变了你拦得住时间么 提交于 2019-12-24 10:48:29
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Are there any other popular browsers used on the Mac besides Safari? For Windows, there are significant numbers of users with FF and Chrome, but is this also true for Mac users? Or am I safe to say that Safari covers 95% of Mac users? I am asking so that I know what browser/platform combinations I need to test

HtmlElement.InvokeMember, how wait until page loaded?

醉酒当歌 提交于 2019-12-24 10:44:44
问题 In my C# application I use WebBrowser object to read html include postbacks. To read default page by getting page I use WebBrowserDocumentCompletedEventHandler, like: WebBrowser wb = new WebBrowser(); wb.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(wb_DocumentCompleted); wb.Navigate("http://mysite.com"); then in that event I have a page: private void wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { IsDocumentComplete = true; // here I can read

Prevent ghost image on dragging non-draggable elements?

浪子不回头ぞ 提交于 2019-12-24 10:36:47
问题 I'm creating a website that utilizes the HTML5 Drag and Drop API. However, to increase the user experience, I'd like to prevent ghost images when a user drags non-draggable elements. Is this even possible? Further, almost every element seems " draggable " by default. One can click and then quickly drag pretty much any element in a browser, which creates a ghost image along with a no-drop cursor. Is there any way to prevent this behaviour? draggable="false" doesn't work. user-select: none

Google Maps API GeoLocation not working for mobile

我与影子孤独终老i 提交于 2019-12-24 10:19:55
问题 I'm not really sure why the GeoLocation works on my PC, but not my iPhone ... I've got sensor=true within the script call to the API, but apart from that, I'm at a loss. Here's the entire script: <div id="info"></div> <div id="map_canvas" style="width:908px; height:420px"></div> <input type="text" id="addressInput" size="10"/> <select id="radiusSelect"> <option value="5" selected>5mi</option> <option value="15" selected>15mi</option> <option value="25" selected>25mi</option> <option value=

Browser not caching generated images

浪子不回头ぞ 提交于 2019-12-24 10:07:41
问题 It seems that during some tests, Firefox will not cache images that are dynamically generated (or loaded from the cache serverside). I tried enabling caching using headers: $expires = 60*60*24*14; header("Pragma: public"); header("Cache-Control: maxage=".$expires); header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT'); But to no avail. I still get a "200 OK" instead of "304 Not Modified". Seeking an answer using the search on Stackoverflow, i discovered a hint by someone

Disabling JS from within Website for specific browsers

旧时模样 提交于 2019-12-24 09:58:58
问题 My Website is completely designed to without javascript. JS is added completely non intrusively. Now I don't want to test the JS on all browsers (notably older IE versions), because they give no feedback for debugging, and it's just not worth my time. So I'd simply like to disable JS on some browsers (or the opposite: allow it on the browsers I have tested it with). Is there a way to do that? Or do I have to create a JS flag that I have to consult every time before I execute JS? (really don't

Change Browser download folder using C#

风流意气都作罢 提交于 2019-12-24 09:53:44
问题 Is there a way I could change the download folder of the default web browser using c#. 回答1: Concurring with other's comments, you can only do it in a desktop app if you have the right permissions. Here's some sample code to find out the default browser of the system (from this post): private string getDefaultBrowser() { string browser = string.Empty; RegistryKey key = null; try { key = Registry.ClassesRoot.OpenSubKey(@"HTTP\shell\open\command", false); //trim off quotes browser = key.GetValue

Javascript Caching Issue

≯℡__Kan透↙ 提交于 2019-12-24 09:49:51
问题 I am facing Javascript caching issue even though I append version number in javascript include i.e. I am trying to force browser to load new javascript like <script type="text/javascript" src="/aa/bbb/test.js?v=7"></script> but still I am seeing old javascript being loaded by browser. Can anyone suggest alternative fix for this? Thanks in advance. 回答1: Deactivate the cache in your browser. 来源: https://stackoverflow.com/questions/7770412/javascript-caching-issue