My web application allows members of the university to lookup and display their university ID number. It displays that number in an agreed upon format 99999-9999 which was picked to help distinguish it from, say, a Social Security Number, and to make it a bit more readable and easier to memorize. Unfortunately there are a few downstream applications that, for whatever reason, do not cope with the dash and expect a 9 digit integer. This becomes a problem when users, quite reasonably, use cut and paste to capture their ID number from my app and plug it into the afore mentioned brain dead app. I am unable to fix, nor can I apply pressure to have fixed, the brain dead apps, while I am being pressured to remove the hyphen. But before I do that, is there some straightforward, reliable technique that would somehow allow the user to see the ID number with the hyphen, but cause the number without the hyphen to be captured with a browser copy/cut operation?
How to control or edit text that is copied from a web page (for good, not evil reasons)
140 Views Asked by KillerRabbit At
1
There are 1 best solutions below
Related Questions in WEBBROWSER-CONTROL
- Read iFrame contents in a WPF browser window c#
- Choppy HTML5 Video Playback
- is the c# webbrowser reliable?
- Cache Manifest with Windows Forms WebBrowser control (Visual Studio)
- Inspect element from my WPF WebBrowser, using "inspect element(s)"(IE,Chrome,Firefox) to get the css path("copy css-path")
- How to invoke element in a WebBrowser by the class name(s)?
- VB 2010 Express Webrowser Scrollto
- Print multiple files with a WebBrowser Control
- webbrowser documentcompleted event with Dynamic Javascript sites
- Loading new HTML into Visual Basic web browser
- How to use Google Maps API v3 ClientID in application > Webbrowser control
- Finding element tag name for search results of a webpage in a webbrowser control
- CSS-only tabs in a C# System.Windows.Forms.WebBrowser
- WPF WebBrowser execCommand("styleWithCSS")
- window.external throwing error (Unexpected call to method or property access.) in Internet Explorer 10
Related Questions in CLIENT-SIDE-SCRIPTING
- Can I put if condition in javascript to detect any running script
- .PDF and .JPG assets not downloading with JavaScript?
- Inject script to play audio file if InnerText does not match string
- How to dynamically pass a variable to a 3rd party tracking pixel
- do client side frameworks shrink the need for php
- Blank map tiles - Error 410 gone (Mapbox & Leaflet JS)
- Why is this Ajax conditional dialog not working?
- How to implement web-based Anonymity-Tests?
- Authenticate without using a server
- jQuery/Javascript: populate div with data written by a script than store the div's value into a cookie
- Showing a css-based animation while running a computationally-intensive javascript script
- Optimizing javascript for loop
- $.ajax not working with IE and working fine with Mozilla
- Alternate option for RegisterClientScriptBlock, Is going for 100% javascript good option?
- Debugging javascript for webforms project hosted on iis
Related Questions in CLIENT-SIDE-DATA
- Javascript store client-side password across pages in memory
- Simple, standalone (i.e., no external files), offline, client-based solution for selecting file and displaying contents in HTML with Javascript
- Exposing server-side state through client-side controls in ASP.net
- What is the best practice for passing large amounts of client side data to the server?
- In a classic ASP application, is it better to use a session or cookie for cross-page data persistence?
- IDBKeyRange querying by key, where key is String
- Communication between a .Net desktop application and a Silverlight application in browser
- Chrome Extension and a Client-Side Database
- How can I filter a string field in a dataset with a like clause and an umlaut?
- ASP.NET Hidden fields data only available in a postback? why?
- How to control or edit text that is copied from a web page (for good, not evil reasons)
- Store raw data in cookies - good idea or a bad idea?
- How to track users without authentication on nodeJS
- Best way for cross platform client storage?
- how to get data filled in pdf application dispalyed in angular 5 client side?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Of course you can, now are you wanting to copy it from your web browser control or from an external internet explorer window? If external IE window, then you will need to get a reference to this window, which can be done using the windows title, then using that reference (or, if in a web browser control, directly using your web browser control), you can search for the element where that id resides in either by tag / element name, or tag / element id, or other means (ie: you will need to figure out if its in a div tag or span tag etc)... Once you find it, get a reference to it, probably using IHTMLElement to declare your reference type... And you'll be able to either copy it and do some string manipulation on it and store it wherever you want, or you can just update the live value on the page with the new value (live editing on the page the user is seeing, to change the elements value by copying id, removing hyphen from copy in a string variable, and then assigning it back to the element we got it from).
You can use the elements .value property to read from and assign to the element, depending on the element, but most elements use .value or innertext, once again, depending on the tag/element :).
Let me know if u need some code you will need to tell us what element we are dealing with, or the HTML sample of what surrounds the student Id you want to play with.