Skip to main content

Home/ javascript/ Group items tagged with

Rss Feed Group items tagged

Javier Neira

JavaScript EE, Part 1: Run JavaScript files on the server side - 0 views

  • freedom to use the same JavaScript routines on both servers and clients. In addition, the techniques presented throughout this series will allow you to maintain a single code base for both Ajax and non-Ajax clients
  • This double-coding issue can be avoided by using JavaScript combined with Java code on the server side, getting full support of scripting languages through the javax.script API. In addition, the Java SE Development Kit (JDK) 6 already includes Mozilla's Rhino JavaScript engine, which means no setup is required.
  • the toSource() method, which all JavaScript objects must have.
  • ...5 more annotations...
  • engine.eval(scriptReader, vars);
  • sun.org.mozilla.javascript.internal.NativeObject
  • all data exchange between the Java code and the executed script should be done through primitive variables, strings, and Java objects (for example, beans) whose properties and methods can be accessed very easily in the JavaScript code. Simply said, don't try to access native JavaScript objects in your Java code. Use Java objects in the JavaScript code instead.
  • Note that javax.script.Invocable is an optional interface, which some script engines may not implement. The JavaScript engine that comes with JDK 6 does support this interface.
  • you can significantly reduce the execution time by compiling the scripts, using the methods provided by another optional interface named javax.script.Compilable, which is supported by the JavaScript engine of JDK 6.
Ivan Pavlov

narwhal - 0 views

shared by Ivan Pavlov on 02 Jun 09 - Cached
  •  
    Narwhal is a server-side JavaScript standard library conforming to the ServerJS standard. It is designed to work with multiple JavaScript interpreters, and to be easy to add support for new interpreters. Wherever possible, it is implemented in pure JavaScript to maximize reuse of code between platforms.
Mohammed GHERAÏSSA

Simple Page Peel Effect with jQuery & CSS - 0 views

  •  
    You have probably seen these forms of advertisings where you can peel a corner of a website and see a message underneath. It seems most are flash driven, but I
yc c

Better, Stronger, Safer jQuerify Bookmarklet » Learning jQuery - Tips, Techni... - 0 views

  •  
    when you're on a page in which you want to play around with jQuery in the console, just click the bookmarklet.
yc c

HTML & JavaScript Encoder/Decoder - 1 views

  •  
    Encoding/Decoding Escape/Unescape These scripts are intended to explain how to "hide" HTML and/or javascript from other people who view your page's source code. It is not foolproof, but it does make it more difficult to read and understand the source code. Due to the nature of how these scripts work, the explanation may seem complicated and drawn out, but be patient and it should make sense once you gain a little experience with them. You don't really have to know the ins-and-outs of these scripts, but it does help you understand how and why they work. So, take a seat and I'll do my best to make this seem as un-complicated as possible.
Javier Neira

Accessing a MySQL database from Node.JS « Devthought - 2 views

  •  
    connection.query("SELECT * FROM TABLE").addCallback(function(result){ for (var i = 0, l = result.ROWS.length; i < l; i++){ var row = result.ROWS[i]; // do something with the data } });
yc c

Cross Browser Copy To Clipboard - 1 views

  •  
    This has been tested with Firefox 3.5.5, IE 8 (8.0.6001.18702), Google Chrome 3.0.195.33, and Safari (Win) 4.0.4 (531.21.10). For web spiders, no content is hidden from them so it matters not whether they support Flash or JavaScript.
yc c

Web development and deployment tools: CodeRun - 1 views

  •  
    Build-time error reporting, refactoring and code completion in Visual Studio Extended JavaScript syntax power with C# language features Pure client-side control library coded in C#
Julian Knight

3 reasons why you should let Google host jQuery for you | Encosia - 3 views

  •  
    Handy reference on using Google CDN for JQuery loading with details on possible issues and work-arounds.
Javier Neira

JavaScript: The World's Most Misunderstood Programming Language - 1 views

  • JavaScript: The World's Most Misunderstood Programming Language
  • This is misleading because JavaScript has more in common with functional languages like Lisp or Scheme than with C or Java.
  • It has arrays instead of lists and objects instead of property lists. Functions are first class. It has closures. You get lambdas without having to balance all those parens.
  • ...1 more annotation...
  • Some argue that JavaScript is not truly object oriented because it does not provide information hiding. That is, objects cannot have private variables and private methods: All members are public. But it turns out that JavaScript objects can have private variables and private methods. (Click here now to find out how.) Of course, few understand this because JavaScript is the world's most misunderstood programming language. Some argue that JavaScript is not truly object oriented because it does not provide inheritance. But it turns out that JavaScript supports not only classical inheritance, but other code reuse patterns as well.
Javier Neira

Playing with JQuery Validation Library, Part 2 | Elegant Code - 2 views

  • The new part is the remote in the script.&nbsp;&nbsp; You give it the name/location of your web service to call to validate the field, and the field name/value are passed in.&nbsp;
  • 1: $('#UserNameForm').validate({ 2: rules: { 3: userNameEdit: { required: true, remote: "&lt;%=Url.Action("VerifyUserName", "Account") %&gt;" } 4: } 5: });
Mike More

Topsy Tip: Another Retweet Button to Embed Anywhere! - 1 views

  •  
    Topsy has just released a Wordpress plugin that gives you another retweet button. But, what if you can only work with a JavaScript widget? here is a small hack..
Javier Neira

JavaScript setTimeout Function - JavaScript Timing Events - 0 views

  •  
    JavaScript setTimeout Function - JavaScript Timing Events November 16, 2007 by Blogging Developer JavaScript features a couple of methods that lets you run a piece of JavaScript code (javascript function) at some point in the future. These methods are: * setTimeout() * setInterval() In this tutorial, I'll explain how setTimetout() method works, and give a real world example. You may find the details of setInterval() method in JavaScript setInterval Function - JavaScript Timing Events setTimeout() window.setTimeout() method allows you to specify a piece of JavaScript code (expression) will be run after specified number of miliseconds from when the setTimeout() method is called. Syntax var t = setTimeout ( expression, timeout ); The setTimeout() method returns a numeric timeout ID which can be used to refer the timeout to use with clearTimeout method. The first parameter (expression) of setTimeout() is a string containing a javascript statement. The statement could be a call to a JavaScript function like "delayedAlert();" or a statement like "alert('This alert is delayed.');". The second parameter (timeout), indicates the number of miliseconds to pass before executing the expression. Example An alert box will be shown 5 seconds later when you clicked the button. clearTimeout() Sometimes it's useful to be able to cancel a timer before it goes off. The clearTimeout() method lets us do exactly that. Its syntax is: clearTimeout ( timeoutId ); where timeoutId is the ID of the timeout as returned from the setTimeout() method call.
Javier Neira

Inheritance Patterns in JavaScript - 2 views

  •  
    This article discusses the advantages of the pseudoclassical pattern over the functional pattern. I argue that the pattern used by the Closure Library paired with the Closure Compiler removes existing hazards while I also examine the hazards introduced by the functional pattern (as defined in The Good Parts). First let me demonstrate what I mean by the functional pattern.
Julian Knight

JQuery Cycle Plugin - 1 views

  •  
    "The jQuery Cycle Plugin is a lightweight slideshow plugin. Its implementation is based on the InnerFade Plugin by Torsten Baldes, the Slideshow Plugin by Matt Oakes, and the jqShuffle Plugin by Benjamin Sterling. It supports pause-on-hover, auto-stop, auto-fit, before/after callbacks, click triggers and many transition effects. It also supports, but does not require, the Metadata Plugin and the Easing Plugin." This is one that really works and is genuinely easy to set up - no complex CSS like so many of these things. It also works very well with just text or other HTML structures.
Julian Knight

JQuery Selectors - 0 views

  •  
    Online quick reference with examples and links to full documentation.
« First ‹ Previous 41 - 60 of 100 Next › Last »
Showing 20 items per page