My web application uses alert and confirm boxes to display information when a link is clicked.
All browsers display these boxes properly except for Chrome. When I click on a link in Chrome, all I get is the box displayed with one word "Javascript" inside.
It has to work correctly in all browsers, even if the box displayed is constructed a little different in each. It barely works in IE but it does work and if you are going to use that crippled excuse for a browser, you deserve it! ;)
I didn't think this simple problem required a demo in jsfiddle and every one knows what an alert or confirm box looks like, nevertheless if someone needs more clarification please don't just not answer at all, but let me know.
Thanks,
Paul
well alert box is a browser component, therefore all browser vendor uses their own implementation. Since you want same result on all browser, the best you can do is use your own code to produce the result like using modalpopup which will be static around all browser
If you want to ensure cross platform and cross browser compatibility i would use something like:
jQuery Dialogs
Would be alot handier and ensure it looks/works the same everywhere.
Please note jQuery is just an example and any other alert/confirm like JavaScript/CSS would do the job just don't rely on the browser!
Please also note that browsers can change there implementation at any time leaving you stuck if you dont use your own!
Related
So, I'm trying to run on random websites, to play with the javascript psuedo-protocol.
javascript:alert("testtesttest");
And it never works. I've tried 6 websites, and I have no clue what I'm doing wrong. I've tried googling with little success. I'm using the latest version of firefox, and I have javascript enabled.
Firefox disabled it for security reasons, because people were pasting things they were told to in the address bar.
but it still works, if you trigger it from your javascript code.
And in chrome code, I found many cases, a window is initialized with this kind of protocol.
For example if you visit http://www.w3schools.com/jsref/met_win_settimeout.asp
There will be some inside windows to be opened with
javascript:"<html><body%20style='background:transparent'></body></html>"
then later on, the location.href changed to
http://www.w3schools.com/jsref/met_win_settimeout.asp
Any one knows why this kind of change happens, and why it is allowed?
Does it suggest for layer window, the location of the window can be changed to the main page?
I need to disable fullscreen message ("you've gone fullscreen") coming on the top when chrome fullscreen mode is activated .
i need to do it through javascript . but it's one of the default functionality of chrome.
can any one help me out ?
It's not possible. As you pointed you it's one of the default functionality of chrome.
and I agree with the comment by mic You can't it's there for security
That message is, if you it can be disabled at all, likely a user preference. I have had my fair share of changing that kind of things for a custom "layer" over windows with an integrated browser and I can tell you it's impossible with javascript without some listener app. We created a C# listener app for that kind of thing that keeps checking a certain text file. We made javascript edit the text file and then let C# work it's hacking magic in some of the user's settings.
You could take a look at Chromium, the stripped down version of Chrome, if that would be of any help ;)
ps: To all the people going mental over changing user settings like that, our customers were old people that were unable to use a computer, and our application's purpose was to do as much as possible for them.
You cannot possibly do that as suggested by these links.
https://superuser.com/questions/398945/disable-the-youve-gone-full-screen-notification-in-chrome
https://groups.google.com/forum/#!topic/chromebook-central/h1crbhOy-7U
On the other note, why exactly would you want to do that?
I've put up a code for commenting box on my html file for the visitors to comment on something in my website, and the code is provided from a website that offers it for free.
The problem is, the commenting box is visible and functions perfectly on Internet Explorer, but in Google Chrome Browser, or FireFox Browser, the commenting box doesn't even appear on the screen. When i view source by right-clicking, the code is still there, but does not show on the screen, and I think something is wrong with the code.
I have tried to fix this myself, and I could not figure this out alone.
Here is the code that was provided from the free commenting box website.
<div class="js-kit-comments" backwards="yes" paginate="10"></div>
<script src="http://js-kit.com/comments.js"></script>
I wish i could provide more code, but honestly, this is basically it.
I really hope you guys can help me out on this one. Thank you in advance.
The big js code isn't made to be compatible.
First line :
try { if(!window.JSK$EPB && navigator.appVersion.match(/[345]\.[.0-9 ]+Safari/)) {
This is not the task of SO to adapt and/or debug a big proprietary script in the blind.
Is there a way to reduce or filter the number of scripts shown in script debugger? With Chrome it just shows the file containing the scripts instead of every single script block.
Also, when I set debug points on an inline script and go through the code the page reloads and selects the first script in the drop down. I then have to reset all my break points.
Overall Opera seems to be pretty cool, just need to find a way to work around these few annoyances.
I don't think there's any way around these at the moment. My experience with Dragonfly is pretty similar... Overall it's great but there's a couple of small annoyances :)
You could try filing a ticket to get it fixed.
There's a filter in the Scripts dropdown now, should make it easier to get where you want to go. On breakpoints, I'm not sure what you mean. They shouldn't disappear unless you close Dragonfly or change the debug context. You can always see all Breakpoints and navigate directly to them from the Breakpoints panel on the left.
If not, then yes, please file a bug.
Using jQuery, is there a way to disable the click sound in IE that happens when you post?
The IE click sound is a feature of the browser that you can't control from JavaScript. The only way to disable it is in System Sounds in the Control Panel.
It may very well be possible using this solution: http://www.julienlecomte.net/blog/2007/11/30/
But in short, John is right about it being a browser sound not controlled by javascrÃpt or anyting else than a registry change, wich a website will not manage to do.
I know the above "trick" has worked before, so if nothing has changed it will still work.