You are currently browsing the archives for the Scripting category.

Archive for the ‘Scripting’ Category

postheadericon Disable submit button with JavaScript

Imagine you create a beautiful form with lots of controls to validate made in Ajax, in this case it is essential that the user’s browser has JavaScript enabled form,step for this:

  1. Detect activation or not support JavaScript;
  2. Require the navigator to enable support missing;
  3. Block the form’s submit button until JavaScript is enabled.

To do this enough very few lines of code, first fix this Alert in a prominent place on the page (if possible before the beginning of the form or just before the submit button):

<span onmouseover="_tipon(this)" onmouseout="_tipoff()"><span class="google-src-text" style="direction: ltr; text-align: left;"><noscript></span> <noscript></span> Read the rest of this entry »

postheadericon Five reasons for not using Ajax

Ajax is a great and difficult technology services provided by Web 2.0 would be just as easy to use without the support of a technical development such as Asynchronous JavaScript and XML.

Ajax has only advantages? As with all things of this world it is too peremptory statement, then some (of course debatable) disadvantages to this technology:

  1. Too much code: Introduce Web application pages in many cases the Internet is “drowning” of code, too much code will take more performances by the browser that will work more slowly;
  2. Uncertainty: Using Ajax is used often using ready-made solutions created by others, think of the countless plugins for the various frameworks, who assures that these are safe?
  3. Read the rest of this entry »

postheadericon JW Box: a lightbox for JW Player

If used on your site’s media player JW FLV Player and want open movies in windows style lightbox there are various possibilities, the easiest solution is, of course, use the plugin JW Box designed by the same developers JW Player to interact with it.

JW Box is a simple plugin jQuery clone of the famous Lightbox that can be used both for video and for other content such as images or HTML.

Its operation is simple : just insert the header of the page references .js jQuery and plugins, as well as the style sheet .css

<script type="Text / javascript " src=" jquery.js "></script>
<script type="Text / javascript " src=" jquery.jwbox.js "></script>

<link rel=" stylesheet " type="Text / css " href=" jwbox.css " />
Read the rest of this entry »