Ajax Calling in jQuery

Step 1:  Callingajax.html <!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”> <html> <head> <meta http-equiv=”Content-Type” content=”text/html; charset=ISO-8859-1″> <title>Javadomain example</title> </head> <script src=”scripts/jquery-1.9.0.min.js” type=”text/javascript”></script> <script type=”text/javascript”> $(document).ready(function() { $(‘.button’).click(function() { $.ajax({ url : “sample.html”, type : “GET”, error : function() { alert(“failure”); }, success : function(data) { $(‘#cm’).html(data); // to display the sample.html file content. } }); }); }); </script> <body> […]

447 total views, no views today

» Read more

Java splitting based on dollar

Program: package com.javadomain.in; public class JavaSplitDollar { public static void main(String[] args) { String input = “duo$pulsar$karizma$apache$fzs$platina$glamour$discover$shine$twister$activa”; String[] split = input.split(“\\$”); for(int i=0;i<split.length;i++){ String output = split[i].toString(); System.out.println(output); } } }   Output: duo pulsar karizma apache fzs platina glamour discover shine twister activa     Thanks for reading this post…….!!! 410 total views, no views today

410 total views, no views today

» Read more

Java splitting based on comma

Program: package com.javadomain.in; public class JavaSplitComma { public static void main(String[] args) { String input = “nokia,samsung,motorola,apple,lg,sony”; String[] split = input.split(“,”); for(int i=0;i<split.length;i++){ String output = split[i].toString(); System.out.println(output); } } }   Output: nokia samsung motorola apple lg sony     Thanks for reading this post……….!!! 332 total views, no views today

332 total views, no views today

» Read more

jQuery Bubble popup example program

jQuery Bubble popup program example: Download the jQuery Bubble popup example program  Step 1: Javadomain-jquery-bubble-popup.html <!DOCTYPE HTML> <html> <head> <title>jQuery Bubble Popup – Javadomain</title> <link href=”jquery-bubble-popup-v3.css” rel=”stylesheet” type=”text/css” /> <script src=”jquery-1.7.2.min.js” type=”text/javascript”></script> <script src=”jquery-bubble-popup-v3.min.js” type=”text/javascript”></script> <script type=”text/javascript”> $(document).ready(function(){ $(‘.button’).CreateBubblePopup({position:’top’,align:’center’, innerHtml: ‘Javadomain First Jquery Bubble popup!’,innerHtmlStyle: {color:’#FFFFFF’,’text-align’:’center’},themeName: ‘all-black’,themePath:’jquerybubblepopup-themes’}); }); </script> </head> <body> <div class=”page”> <div class=”header”> <h3 align=”center”>Javadomain jQuery Bubble Popup […]

862 total views, no views today

» Read more

Test cases using selenium IDE step by step

Step 1: Download the selenium IDE and  selenium-server-standalone-2.28.0.jar (31.5MB). Step 2: Installing selenium IDE, (you must need mozilla firefox for selenium ide test cases)   Step 3: After the successful installation, You will be able to see the selenium IDE in your mozilla tools option.   Step 4: You will be able to see the play button like below, Start the play button, and enter some […]

502 total views, no views today

» Read more

Database connection using php

Program: <?php $link = mysql_connect(‘localhost’, ‘username’, ‘password’); if (!$link) { die(‘Could not connect: ‘ . mysql_error()); } echo ‘Connected successfully’; mysql_select_db(‘database_name’); ?>    Example: <?php $link = mysql_connect(‘localhost’, ‘javadomain_db1’, ‘jdk7’); if (!$link) { die(‘Could not connect: ‘ . mysql_error()); } echo ‘Connected successfully’; mysql_select_db(‘javadomain_registration’); ?>     Thanks for reading this post……..!!! 326 total views, no views today

326 total views, no views today

» Read more

substring replacements

  Substring replacements: Syntax: substr_replace($existing_string,$overwritting string,$int_start,$int_length); Example: substr_replace(‘my dog’,’cat’,3,3);          my cat substr_replace(“my\ndog”,”cat”,3,3);      my cat    // since \n is used, so cat displayed in next line. Program: <?php print substr_replace(‘5777 7777 7777 5555′,’xxxx’,0,14); ?>   Output:     Thanks for reading this post…………!!! 372 total views, no views today

372 total views, no views today

» Read more

Substring in php Example

Substring: If you want to extract substring from a given string then use the Syntax: substr($string_input,$int_start,$int_length) Example: substr(‘God is love’,7,4); Program: substring.php <?php print substr(‘god is love’,7,4); print substr(“god is love”,7,4); print substr(‘8124066089’,5,4); print substr(“8124066089”,5,4); ?>   Output:     Thanks for reading this post………..!!! 366 total views, no views today

366 total views, no views today

» Read more

fwrite example in php

The fwrite() is used to write the contents to text file. Syntax: fwrite($fp,’content’); // content will be written $fp pointer and it will be written in data.txt. Program:  <?php $fp = fopen(‘data.txt’, ‘w’); fwrite($fp, ‘1’); fwrite($fp, ’23’); fclose($fp); // the content of ‘data.txt’ is now 123 and not 23! ?>   Output:   data.txt file: // it will be written […]

428 total views, no views today

» Read more
1 51 52 53 54 55 65