Is there a JavaScript/jQuery library to handle auto-direction of input? - javascript

I am looking for a jQuery library to help with handling bidirectionality
Google has one in the closure library, but I feel it is a waste to include all of the library just for bidi input support (unless you recommend me otherwise)
http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/bidiinput.html
the google closure library is a seemingly endless collection for files, with many dependencies. I don't see how using it for 1 function is efficient
http://closure-library.googlecode.com/svn/trunk/closure/goog/
update
I found this from a drupal project. I am unable to make it work. Anyone know of it?
update2
it seems that adding "dir=auto" to the input field handles it.
works in chrome and ff. anyone can confirm this?

dir=auto should fix it.
it is in the html5 standard, although safari doesn't work with it
http://www.w3.org/International/tutorials/new-bidi-xhtml/qa-html-dir
works with chrome and firefox.
Thanks me :)

Related

Can the Firefox JavaScript JIT be disabled from a script?

Our web site has a fairly complex JS app that fails with the latest Firefox 10 release. This is due to what appears to be a bug in the JS interpretor, making variables return NULL when they clearly aren't. This bug only occurs when the JIT compiler is active, not when it's disabled. We will report the bug to Mozilla and try to find a workaround.
Is there a way to disable the JIT in Firefox for a specific script, from inside the script?
Thank you.
The answer comes from Brian Hackett (:bhackett) at mozilla.org:
Using with in a script will disable the JIT for that script, e.g. adding a with({}) {} to the top.
See it here https://bugzilla.mozilla.org/show_bug.cgi?id=730004#c11
Great news. This does indeed work around the issue.
Thanks everyone! Mozilla rocks!
Gabriel, there is no reliable way to do it. You may be able to disable the JIT for particular functions by using some sort of features that the JIT doesn't support yet, but obviously the JIT folks try to minimize the set of circumstances that can trigger this... There is no official "turn off the JIT" command.
On the other hand, once you file the bug the JS engine folks may be able to suggest a workaround on your end, depending on what's going on.
Please cc me (":bz") on the bug you file?

How to package JavaScript as a .NET Internet Explorer 9 Plugin?

How to .NET package JavaScript as an Interner Explorer 8/9 Plugin, with the JS to be included in all IE browser pages?
I have recently finished writing JavaScript code for a browser addon, which basically runs on page-load via a JS load event listener, and for given domains it then checks for certain elements in the DOM and adds new relevant elements(i.e. information) to the page.
Since the JavaScript only reads/affects the HTML DOM independently (and does not need any toolbar buttons or anything else) the JS purely needs adding to the browser's webpages.
I have packaged the code to work with Firefox and Chrome and those are both working well, and I can run the code for IE in 'bookmarklet' form without problems, but I would like to learn how to package JavaScript as an actual .NET .MSI addon/plugin that will install for the current Internet Explorer 8/9.
Does anyone know of a suitable guide or method I might refer to please? I have tried searching online for tutorials but most walkthroughs refer to writing the plugin body itself (usually in other languages) and are thus not regarding packing existing JS.
I hope someone might have the solution please?
Note: Someone packaged an old version for me as a MSI installer for Internet Explorer 7 a year ago, which installed into Program Files with a plugin.dll plugin.tlb and plugin.InstallState plus BandObjectLib.dll Interop.SHDocVw.dll and Microsoft.mshtml.dll if that is useful.
Edit: Does anyone else know of any other options please?
IE doesn't have a mechanism for this, there simply is no JavaScript based extension ecosystem (though there are other methods to create extensions) for those browsers, yet. IE8 won't be getting one, you can pretty much guarantee that, IE9...we'll see what happens.
The closest JavaScript option available to you would be bookmarklets, which have much more limited functionality...but it's what's available.
Check out http://www.add-in-express.com/programming-internet-explorer/ and http://www.add-in-express.com/programming-internet-explorer/deployment.php they sell a package for this. It will cost you 200 dollar, but will save you allot of time (atleast, It saved me allot of time :) ).
I found a tutorial to create a plugin that loads JS-Code
http://shout.setfive.com/2012/05/01/internet-explorer-extension-quick-start-and-skeleton/

Adding WYSIWYG to a site that is not your own?

This website that I use has a WYSIWYG that ONLY works in IE. And I refuse to use IE or to tell my non-tech team to use IE.
I was wondering if there is a user script or browser plugin that would enable anyone to inject a WYSIWYG such as CKeditor.com onto any site textarea?
Edit: I would also be willing to work on it myself if anyone wants to help or give advice. We could then post it on userscripts or something ...
Since you don't have access to the code, anything you do will be a hack.
With that in mind, I would start looking at Greasemonkey. It is a firefox plugin that allows you to inject javascript code into any web page on your machine. Its a long road, but that's probably your first step.
One word of warning however: While I share in your dislike of IE, it sounds like your hatred has grown to the point where it is being counterproductive. Seriously consider whether what you are about to do is worth the effort.
You can use this extension in Firefox as long as you get at least a textarea in that CMS: https://addons.mozilla.org/en-US/firefox/addon/6147/
Would a Firefox extension that displays websites as if they were in IE do the trick?
I like Stargazer712's answer (look into Greasemonkey), but there is another option.
Suck it up and use IE for just this site.
Hey, I hate IE6 and 7 as much as the next Web developer. I advise non-techies to stay away from it, and to use Firefox or Chrome. My answer isn't meant to be flip or funny.
Sometimes, if you need to get the job done, you choose the best tool for the job (even if you don't like using the tool) to get the work done in the most efficient manner possible. In this case, it sounds like using IE to access this particular Web site takes care of the problem without a single line of code or documentation written on your part.
The alternative is spending hours finding (and testing -- because you won't be the only user) an alternative...or worse, spending hours or days developing (and, again, testing) your own code to fix the problem that, at the end of the day, is really only caused by your strong dislike of the one software application that works.

Internet Explorer to Firefox javascript migration library - does one exist?

I am working on a legacy ASP.NET web site that is highly dependent on Internet Explorer. I would like to migrate it to non-IE browsers. I know there are a large amount of differences (as detailed at quirksmode.org, etc.), so I'm searching for a javascript library that can help minimize the amount of source I'd have to change.
I'm hoping that my lack of success in finding such a beast so far means that I'm just a bad google-er, and not that I'm just going to have to slog through coming up with replacements/workarounds for all of IE's proprietary functionality that this site currently uses (it uses quite a bit).
Any help you can provide will be greatly appreciated. Thanks!
Frankly you should probably convert the site to a well known multi-platform javascript library such as ExtJs or jQuery.
This'll let you standardize your javascript to work on all browsers (including ie)
I suspect that you're going to have to slug through a little. I don't know much about IE, but I'm really happy when I use jQuery. There are many functions and modules that expand the functionality available. And there is lots of help here on Stack Overflow and at api.jquery.com.
Good luck!

flash interaction with javascript internet explorer

I have a flash object interacting with a javascript function. The interaction works fine in every browser except in IE (all versions)
I have tried with swfobject and with classic embeding. AllowScriptAccess is set to "always". Is there any cause for this flaw ?
Thanks
If you're using ExternalInterface, the problem may be related to the way you're attempting to reference the object in JavaScript. Take a look at my answer to this question -- it might not be exactly the same issue, but my answer provides an end-to-end example of ExternalInterface that's been tested on IE, too, so you might want to compare it to your own to see whether anything's missing or out of place.
If that doesn't help, though, try posting some code, so we can have a look at what's going on and maybe diagnose the problem more specifically.
If you are running the test from a file instead of testing it on a webserver it might be because security settings.

Categories