Running Javascript under Celerity[HTMLUNIT]

Lately there have been too many people wanting to know how to execute Javascript in Celerity. Let me show you how it done. First a quick note on JRuby installation. Here are few useful links to install JRuby under 1. Linux(ubuntu) should work for other linux packages as well. 2. Windows. Just to confirm,kindly type jruby -v on terminal or cmd depending on OS you are using and you should get the version of jruby you are running. Mine output

Continue Reading

Static pages in rails

Static site using rails As we know rails is mainly used for dynamic website.we can also display static web pages or we can deploy full static website using rails. The following code can help us to display static pages. Step 1:-Create Rails project Step 2:-Generate StaticPage Controller Step 3:- Create StaticPage Class in Model Step 4:- Add following line in routes.rb Here we are passing filename as parameter which is static file name. This will generate url as http://sitename/page/static_filename.html Step

Continue Reading

Generate PDF Using Rails and Flying Saucer

Rails Pdf Plugin act_as_flying_saucer There are various ways to generate pdf documents in any language.In Rails we can use prawn library ,HtmlDoc,PrinceXml and many other library,using their api we can generate pdf document.Basically the primary goal is converting HTML web pages to PDF Document,without much changing existing CSS and HTML. Using the Flying Saucer Project we can achieve this.we can convert HTML + CSS to PDF documents without much changing HTML and CSS. It also support CSS 2 and many

Continue Reading

Dynamically updating selectlist using Jquery and Ajax

In many web site we have seen that on selecting country, state or city list is updated. In this article i am showing how to update children select list on changing parent list. To do this i am using jquery and ruby on rails.although it will works for almost all languages For this article, I am updating city list on changing states. So one state has many cities,and city belongs to state. and city_list.xxx gives following html on processing state

Continue Reading

Select/Deselect Multiple CheckBox Using Jquery

In many website we have seen that on checked or unchecked one box all the check box are checked or unchecked. Now in this article i am showing how to checked unchecked all the check box In this setting checked attribute true/false alternatively by clicking on select/deselect for alternate removing and adding class not_checked depending upon that we are setting true and false

Continue Reading

How to include another html page into existing html page using jquery

We can include another html page using jquery load method example is as shown below <html xmlns="http://www.w3.org/1999/xhtml">    <head>       <title>Loading an Html page</title>      <script src="jquery.js" type="text/javascript"></script>     $(document).ready(function() {         $('#loadpage').load('load.html or any server side page');     }); </head> <body>    <div id="loadpage" ></div> </body> </html>

Continue Reading

Site Footer