I'm currently developing a plug in for Internet Explorer, and there's a certain feature in Internet Explorer that's bothering me.
There's this feature in IE that's been appearing at least since IE7 (I couldn't check earlier versions), that lets the user modify the sizing of HTML elements in editable windows (such as a rich text mail in GMail), just by clicking on the element and dragging the sizing box. This modifies the style of the HTML element (such as a <img> or a <div>).
My first problem is that I don't know the name of that feature. I've searched and searched, but I haven't been able to find a thing.
My second problem is that I need a way to either turn it off, or at least to work with it, programatically. In my plug in, I need to modify the DOM in webmail clients to modify certain things that the user types. The problem is that for some reason, the behaviour of my plugin varies if an HTML element is selected using this feature in the edit window of the webmail. I need to, at the very least, be able to detect if anything is selected this way.
Any help will be appreciated. Thanks a lot!
You're probably talking about Internet Explorer's Accessibility Features, which are designed to assist the visually impaired to use websites. Visual impairement can take many forms, and it's generally considered very bad form to take away any tools designed to assist users in their efforts to effectively use the Internet.
Don't make your users work harder to use your site. You get paid to write software that's easy to use and makes life simpler. If your site doesn't do that, your users will find one that does.
Related
I am trying to develop web parts with custom functionality for editing for normal users. In the chrome bar there would be the same sort of controls as you see in the top right of your browser (except with a triangle instead of a line).
Triangle is to minimise/restore (as in OOB, but with different display)
Square is to maximize a new module type window, probably with an iFrame displayed in a module type view window with jQuery with an additional field to add the url to where it should go
Cross is to delete web part
The functionality is required across a few different types of web parts including calendar, CBQ, Data View, CBQWP, and would ideally be a part of a custom chrome that would be added to them. I don't do back end code so I'm finding it hard to get my head around how someone would put together the functionality. Unless it's simple it won't be me writing this functionality. I have Enterprise 2010 for development, but the people using the control would only have foundation.
I'm basically after opinions about how this would be done. I think it should be a custom control written into the chrome, if that's possible. Does that seem feasible or is there a better way of doing it?
I would really appreciate any advise, even if it's just that it would be better to skin the existing chrome and leave the functionality as is. There's leeway with the functionality so at this stage it's deciding on how best to do it if it's possible or not too bother going down that route.
Thanks very much in advance!!
I want to be able to use the .NET WebBrowserControl to record and repeat user actions to automate the collection and retrieval of text from web pages for a data extraction tool that I'm building, but am unsure about how to best approach this.
I specifically want to use the .NET WebBrowserControl as it can be embedded in a .NET form and also used within a server side process without a UI. I'm aware that there are other means of recording and repeating user actions such as Selenium, but for now I am interested in a solution around the web browser control (just to keep answers focused).
Actions to be recorded are those such as button clicks, drop down list selection, link clicks etc.
Potential solutions I have looked at so far:
(Please correct me if my notes based on brief evaluations are wrong)
iMacro (doesn't appear to have a component that can be used within a project, to record user actions, rather the GUI has to be used).
WaitN - Good for programmatic play back - but no recording facility that can be hooked up to the web browser control?
I'm presuming this is possible as services like Mozenda appear to make use of the WebBrowserControl, or some IE like version based on mshtml.dll.
Are there any other options I can look at?
Any insight would be appreciated.
yap, as in Mozenda ,when user create any action like goto mainpage>click on images>download image etc... the XPath is recorded with the each page url into XML file. So, use self learning algorithm to implement such kind of XML better way than mozenda.
i have developed one application using JSOUP and Regular Expression Parsing works same as mozenda do. i created the configuration file which contains the XPath of all the items you want . Which works great for me.
Hope this helps,
Could some one please help me out to hide a view source option of a web page in dot net ?
You can't, it is an option of the browser. The best you can do is obfuscate it.
Back in the Geocities era of the internet it wasn't uncommon for sites to use javascript to capture right clicks and popup a message box saying that you weren't allowed to view the source (or save an image or something).
This isn't quite so common nowadays for three main reasons:
It was futile. Preventing someone from using right click to view the source did nothing, as there are plenty of other ways to get at it. It was a minor inconvenience at best. If the browser can render the HTML, the user can get at it too.
It was annoying. Not just the modal message box whenever you accidentally right clicked. Arbitrarily removing functionality from the user's browser is a no-no.
It serves no purpose. If there is some reason that you really don't want the user to see the source of the website then there is something really wrong. If you are doing it to hide how bad the code is, fear not, terribly awful code makes it to production all the time. If you're doing it out of security then this is a majorly bad decision. Security through obscurity (on its own) is never the right choce.
That said, there are ways of obfuscating the code such that the browser can still parse it, but that it is at least annoying for a human to do so. You can use javascript to write certain parts of the page (a la AJAX) such that viewing the vanilla source code doesn't show what it actually rendered. Or you can compress it removing all formatting and naming elements (once it goes to production) such that it is at the very least annoying to follow.
If you're dealing with Internet Explorer only, you can use Group Policy to disable the Internet Explorer View Source menu item.
See Group Policy entry: View menu: Disable Source menu option.
Group Policy modifications are usually made through gpedit.msc or Active Directory. However, in the most basic scenarios changes to Group Policy can be made via direct edits to the registry.
I was wondering if anyone knows of an existing sample or an approach to achieve the desired functionality.
Basically, what I'm looking for is a web browser like skeleton. The idea is that the main screen of my application is shown in the left tab. This tab can never be closed. On this screen is an overview of various application components such as activities, events, contacts, etc.
When the user clicks on a specific contact/event/activity a new tab is created and auto-focused. The user can view and edit the information. When they are done they can close the tab.
The ability to have multiple tabs open is important.
Also, keyboard shortcuts to easily navigate between tabs would be great, but not absolutely essential at this point.
Note: I don't need to access any web content.
Really what I'm looking for, at least what I think I'm looking for, is a shell of a modern web browser. Does something like this exist? Is there a good approach to building such an application?
Note: I'm new to Windows GUI development, so I apologize if this is a rudimentary question. I was unable to find anything meaningful while searching MSDN and other resources.
Thanks!
What it sounds like is not really a Web Browser shell at all, simply the relative appearance of one functionality-wise.
What you can do is use a TabControl control. This can be altered to suit your needs quite perfectly in my view.
An example of a modified TabControl is as follows: [ From here ]
There are a number of things that can be done with a TabControl (as with any other component) to make it suit what you need.
Here are some links that you may find helpful:
Flat Tab Control - As per the picture
MSDN
Video on using a Tab Control
C# Corner
I want to create with Asp.net a browser inside a web page, so that I can process the click events of the user (for statistics analysis).
I kwnow how to do it with Winforms but I need a full online solution, so that:
The user open an standard browser and types in a start url.
In this url the menus and bars of the standard browser are hidden and
the user can see a "simulated browser", with standard buttons
(back, reload, ...).
From the Asp (c#) code behind this page I can start collecting click
data.
Thanks in advance, and keep the good work.
What you want to collect (a heat map of clicks essentially) is doable, but I don't think the way you want to go about it is very feasible.
Try this out.
I think that using this kind of solution with frames, etc. is much more feasible than embedding a browser (this amounts to writing a browser that can be served up by some kind of java/silverlight technology, not trivial).
Another idea would be that since, I assume, you have the permission of your users to track their clicks, write a greasemonkey (firefox plugin) based on the javascript in the link I provided above. You could then have all users use this plugin script combination to give you their clicks.
Web browsers are normally designed to prevent this kind of cross-site scripting vulnerability. This would only be feasible if you had the complete cooperation of all sites involved.
I don't think browsers will allow you to do this, for the simple reason that it opens up a whole bunch of security holes. If you think about it, an attack site designed like this would be able to follow people around the net tracking their actions, stealing passwords, etc. without them even knowing it was there.
This is not so simple for a web app.
Your options are:
Create a plugin (or Greasemonkey script) for your favorite browser to collect click data.
JavaScript that tracks the user's cursor position. Keep in mind that this won't be reliable if your users go to other sites from within your site thanks to the fact that JavaScript doesn't work well if scripts come from different origins.
You won't be able to make a "browser" control like you can on a desktop app because browsers intentionally don't allow web sites to be that powerful.
For the "browser in a browser" effect, you can use the tag. Remember, you'll only be able to track user actions in this iframe if the source is from the the same domain as the page it's included on.
Cross domain scripting is impossible by client-side. For obvios security reasons, you can't even read from a frame or iframe pointing to somewhere not from your own site.
Maybe the solution here is to to build something similar to the famous PHPProxy, or PHPBrowser, in this case a "ASP.NET Proxy". Its not that hard to build, you can Google for many exemples of those little codes.
While I doubt you can hide the original browsers toolbars etc, you could set up a single page that does this (it certainly wouldn't handle everything though).
This page would contain a the buttons and textbox required (to make up the inner browser UI) and a placeholder that would contain the page that the user requested. Of course the page contained in the placeholder will need to have all the links replaced so that they can be tracked (I would use linkbuttons). I'm not sure how well form submits would work.
Personally I'd use a proxy if I had control of the computer.