Re: Re: Jscript - distinguishing between IE and Webbrowser
Simply test for the existance of the document.all object.
If it's there, then your in IE, otherwise its some other browser.
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Collapse
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
- You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
- You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
- If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Logging in...
Previously on "Jscript - distinguishing between IE and Webbrowser"
Collapse
-
Guest replied
-
Guest repliedRe: Re: Jscript - distinguishing between IE and Webbrowser
Go to: www.quirksmode.org/js/detect.html
That should sort you out.
Leave a comment:
-
Guest repliedRe: Re: Jscript - distinguishing between IE and Webbrowser
Think that's the beforenavigate2 intercept method I mentioned eddie, VB sticks something on end of URL, js detects it. Cheers anyhow.
Leave a comment:
-
Guest repliedProbably not much help, but can't you hard code in some kind of parameter thingy in the vb version?
E.g. http://www.slugshavefeelings.com/ban...isusingvb=true
Then you can decide which way to open the report based on what is passed in the Url.
I've just noticed that this makes my quadruple Nelson post. Bugger, now I'll have to hop on one leg until I think of something else to post.
Leave a comment:
-
Guest repliedCheers dim.
It's educational stuff where pupils can choose say from a selection of newspaper layouts in Publisher or Word.
If they are using the VB browser I can use beforenavigate2 to open the selected documents properly (not that limited OLE thing) in Publisher or Word.
I can't do that from jscript in IE due to the security restrictions, so would like to present alternative text and controls, even if only a message to say they need to use the browser provided.
Leave a comment:
-
Guest repliedThe web browser control is IE (just the window is hosted in VB, that's the only difference).
As far as the JavaScript is concerned, it's IE.
Why does your JavaScript need to know?
Leave a comment:
-
Guest started a topic Jscript - distinguishing between IE and WebbrowserJscript - distinguishing between IE and Webbrowser
Is there any simple way for jscript to be able to distinguish if the page is running in IE or in a webbrowser in VB.? All the navigator properties are the same either way.
Have thought of using the VB beforenavigate method to modify the URL with a marker, but are there any neater methods like a simple flag one can set?
Ta for any ideas.Tags: None
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Reports of umbrella companies’ death are greatly exaggerated Nov 28 10:11
- A new hiring fraud hinges on a limited company, a passport and ‘Ade’ Nov 27 09:21
- Is an unpaid umbrella company required to pay contractors? Nov 26 09:28
- The truth of umbrella company regulation is being misconstrued Nov 25 09:23
- Labour’s plan to regulate umbrella companies: a closer look Nov 21 09:24
- When HMRC misses an FTT deadline but still wins another CJRS case Nov 20 09:20
- How 15% employer NICs will sting the umbrella company market Nov 19 09:16
- Contracting Awards 2024 hails 19 firms as best of the best Nov 18 09:13
- How to answer at interview, ‘What’s your greatest weakness?’ Nov 14 09:59
- Business Asset Disposal Relief changes in April 2025: Q&A Nov 13 09:37
Leave a comment: