browser

How to select a class by GetElementByClass and click on it programmatically

╄→гoц情女王★ 提交于 2019-12-28 23:14:43
问题 I have been trying to use this code to read the element by class in html/ajax knowing GetElementByClass is not a option in webBrowser.Document. I can't seem to get a return value then invoke the member. Is there a work around for this? References: Getting HTMLElements by Class Name Example: <span class="example">(<a href="http://www.test.com/folder/remote/api?=test" onclick=" return do_ajax('popup_fodder', 'remote/api?=test', 1, 1, 0, 0); return false; " class="example">test</a>)</span>

WebBrowser control to use IE9

不问归期 提交于 2019-12-28 18:20:08
问题 I want that the WebBrowser control to use IE9. IE9 is installed on the computer, but the WebBrowser control is still using IE8. I verified with http://www.whatbrowser.org/en/. I try to make some changes to the registry (found a solution here) but is not working. 回答1: I think it is the user agent string that is being passed to the site. It is misidentifying it as IE8 as it might not be meeting the requirements in their logic to match as IE9. I can see the same thing happen on my box as well.

How to get cookies from web-browser with Python?

江枫思渺然 提交于 2019-12-28 15:04:45
问题 Context: I am working on a backend access to an OpenID consumer (StackExchange in fact). If I am to provide all possible OpenID providers as an option to the user, then I'd have to simulate browser interaction to authenticate to each of these providers before I could submit the Open ID URL. However, I think I could cut this short by accessing the existing cookies of the user's web-browser, and requesting authentication to the consumer directly with the URL. Problem: How to access the user's

Rails: Prevent duplicate inserts due to pressing back button and save again

[亡魂溺海] 提交于 2019-12-28 13:38:12
问题 Think about a simple Rails scaffold application with a "new" action containing a form to add records to a database with a "save" button. After the "create" action the controller redirects to the "show" action, where the user can use the "edit" link to edit the just inserted record. So far, so simple. But if the user instead uses the browser's back button after creating a record to get back to the "new" action, the browser shows the form with the values the user just has entered. Now he

Javascript, Can I “redirect” user in onbeforeunload? If cant, how to

北战南征 提交于 2019-12-28 06:46:14
问题 Is it possible to redirect to another page when the user closes the browser? Attempts: I tried onunload, does not work window.onunload = function redirect(){...} I also tried another method, it doesn't work either: window.onbeforeunload = redirect(){...} <body onbeforeunload="return false; redirecty()"> The 3rd method, I want to cancel the onbeforeunload (means delay closing the browser), the I call the redirect function, window.confirm , if yes redirect, if no then close the browser. But it

Minimize browser window using Javascript

只愿长相守 提交于 2019-12-28 06:45:11
问题 Is there a Javascript or jQuery method to minimize the current browser window? 回答1: There is no way to minimize the browser window within javascript. There are ways to change the size of the window, but no true minimization (nice word) 回答2: No, there isn't. However, depending on what you're doing and which browsers you're targeting, you could play around with the blur and focus events of the window to achieve similar effect. 回答3: If you use an extension, then you can minimize by chrome

Why is it so hard to style <select> and <option> elements?

独自空忆成欢 提交于 2019-12-28 06:32:14
问题 Can any browser developer, or anyone who knows why it is so difficult (if not impossible) to style the dropdown list of a <select> , there's any "real explanation" that prevents browsers treat the <select> <option> in a more convenient way. Every time I see questions like How to modify CSS of a dropdown? in different sites that receive answers like "It's not possible to style the dropdown list of a html select. But you can build your own dropdown list or use a framework like bootstrap." or

Automatically refresh browser in response to file system changes?

99封情书 提交于 2019-12-28 06:26:20
问题 When doing web development, you frequently make changes and then refresh the browser. Is there an easy way to have a daemon listening for changes in the filesystem, and when there is one, to send a refresh message to Firefox or Safari? This would really improve your workflow and focus. You could keep your browser running in a separate screen, and when you're working on UI related changes, it would automatically refresh as you're working. It would be like using autotest when doing TDD. (See

Chrome does not redraw <div> after it is hidden

对着背影说爱祢 提交于 2019-12-28 06:17:31
问题 I have some div s that show up on hover, and then are hidden. However, in Chrome (19.0.1084.56 m, Windows XP) when you unhover, Chrome doesn't redraw them as gone until you do something like scroll or resize the window. http://jsfiddle.net/y7NdR/3/ I am aware that certain modifications to my CSS will fix the problem, e.g. removing the position or z-index and overflow properties, but I really don't want to do that--the JSfiddle is paired down from a full site where I need them. Can anyone shed

How to determine the Windows default browser (at the top of the start menu)

蓝咒 提交于 2019-12-28 04:14:32
问题 How can I determine the Windows default browser (at the top of the start menu)? I am using VB6 but can probably adapt other code no problem. There are similar questions on Stack Overflow, but they seem to provide incorrect answers. For instance the key HKEY_LOCAL_MACHINE\Software\Clients\StartMenuInternet\ lists both Internet Explorer and Firefox on my PC. And getting the .html association fails for me as well, as HTML files are associated with IE but Firefox is my default browser. Note that