Monday, 22 April 2013

ajax call to webservice


$j.ajax({
type: "GET",
async: this.asyncAjax,
url: path,
//url: "testData/homeData.txt",
dataType: 'jsonp',
data: "format=json",
jsonp: "jsoncallback",
cache: false,
processData: false,
timeout: timeout,
success: callback,
error: error
});

Wednesday, 17 April 2013

jquery issue

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html>
      <head>
      <title>Simple Form Validation</title>
      <script src="jquery.js"></script>
       <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.js"></script>
      <script>
     
     
        $(document).ready(function() {
          $("#form1").validate({
            rules: {
              name: "required",// simple rule, converted to {required:true}
              email: {// compound rule
              required: true,
              email: true
            },
             url: {
              url: true
            },
            comment: {
              required: true
            }
            },
            messages: {
              comment: "Please enter a comment."
         }
          });
        });
      </script>
      <style type="text/css">
        * { font-family: Verdana; font-size: 11px; line-height: 14px; }
        .submit { margin-left: 125px; margin-top: 10px;}
        .label { display: block; float: left; width: 120px; text-align: right; margin-right: 5px; }
        .form-row { padding: 5px 0; clear: both; width: 700px; }
 label.error { width: 250px; display: block; float: left; color: red; padding-left: 10px; }
        input[type=text], textarea { width: 250px; float: left; }
        textarea { height: 50px; }
      </style>
      </head>
      <body>
        <form id="form1" method="post" action="">
          <div class="form-row"><span class="label">Name *</span><input type="text" name="name" /></div>
          <div class="form-row"><span class="label">E-Mail *</span><input type="text" name="email" /></div>
          <div class="form-row"><span class="label">URL</span><input type="text" name="url" /></div>
          <div class="form-row"><span class="label">Your comment *</span><textarea name="comment" ></textarea></div>
          <div class="form-row"><input class="submit" type="submit" value="Submit"></div>
        </form>
      </body>
    </html>

Thursday, 11 April 2013

OBDevelopment

Home Page
SearchResult




<!DOCTYPE html>
<html>
<head>
<style>
div
{
border:2px solid #a1a1a1;
padding:10px 40px;
background:#dddddd;
width:300px;
border-radius:25px;
}
</style>
</head>
<body>

<div>The border-radius property allows you to add rounded corners to elements.</div>

</body>
</html>