I've made a desktop application which uses Cocoa's NSTokenField:
alt text http://developer.apple.com/documentation/Cocoa/Conceptual/TokenField_Guide/Art/tokenfield.jpg
More info about it here: http://developer.apple.com/documentation/Cocoa/Conceptual/TokenField_Guide/Introduction/Introduction.html
Now I'm remaking this application as webapplication using PHP and AJAX. Is there a way to use a token field (comma seperated) in a web page, so the user can enter e-mail addresses and they are automatically styled like this? A jQuery plug in would be great. Otherwise just normal JavaScript. I thought of a way in CSS which gives every word a style, but I don't know how to do this.
Thanks in advance!
Check this plugin:
jQuery Token Input (demos)
Related
I am using CKEditor in my rails 5 application. I would like to have a support of Internationalizationin my CKEditor means I will select language and when I am typing content should change to that language. Is it possible to add this feature to my CKEditor. Please tell me the possibilities on how to achieve this.
Thanks in Advance.
As a proof of concept, you can try two approaches:
If you need translation on the fly, you will need to use third party services with a JS made requests.
You`ll have to learn the API of ,for example, Bing translation service. And add some JS to send the text to it and replace the CKEditor content with the result.
You can also translate on server side using gems like this. So you can push text from ckeditor to your own backoffice, utilize the gem to send it to API. And render the form with the result.
I am making an android app using phonegap and jQuery mobile.The app will also have option for displaying text in other languages like Tamil,Kannada and Telugu.I want to change all the text displayed when the user clicks on these options for changing the language. What is the best way to do that?
I would look at i18next, a JS library that runs entirely in browser and whose localizations are stored in JSON. It works with jQuery and has several other nice features. Seems like it would cover your needs.
I'm running a Application which supports around 5 European languages. I manually created a language file in the format of JSON. I wrote custom functions to replace the UI element's labels in a separate file which triggers when a page loads.
It just works fine for me.
check out the HTMLed.js framework for jquery mobile localization on GitHub link
I made a website using the famous symfony framework. I wanted to add rich editing feature to it. And I found TinyMCE editor. But there comed a problem: how about the user embed some javascript code into the content? such as alert('hello world').
I tested wordpress, which is a very famous blog software. It faces the same problem. example.
It is no big deal if some one embed an alert script. But what if they embed some dangerous code? Have you encountered the same problem? Should I use markdown instead of html? Any good widget for markdown editing?
It's a good idea to use an existing library to clean out your user input, the html purifier project: http://htmlpurifier.org/ seems maintained and well made.
Don't allow any embedded javascript in your user input. This is easy to clean out either on the client or the server. Have a "white list" of HTML tags you support, and remove any event listener attributes from whatever you do allow.
I need to make new own file upload field using HTML and Javascript since Built-In file upload not showing full path of the file
I need to make it similar to file upload by using button and textbox
please help to solve this problem
You can't.
There are security considerations browsers must adhere to and there is now way around that.
FYI this is also why Firefox doesn't allow drag and drop into a file field.
Just fyi, I think the path display depends on your browser.
If you're willing to/can do so, java (not javascript) might be able to help you with your original problem. Java brings it's own problems, though.
The file upload is a specific input type, which you can't easily replace, but in some browsers you may be able to style it.
You should be able to access the filename from javascript, and display this in a different part of the page (possibly hiding the file input at the same time) so the user can see what will be selected.
Another option is to use Flash for a fancier front-end (see http://www.flickr.com/photos/upload/ (assuming you have a flickr account) as an example), but I've never used one of these as a developer
Javascript from client side.
That is the window.clipBoard in javascript i got some documents where text copied to clipboard is got and shown.
I want the to implement the "PrintScreen" functionality over a web application.
Any help would be appreciated.
After a quick google search to check, no you cannot make screenshots with javascript. You will need to use a different language and if you want to put in a webpage then the user will be prompted for extra privilages. Additionally, window.clipBoardData only works in ie.
window.print() ??