Tuesday 27 July 2010

JQuery Radio Button and inner HTML .

JQuery to check radio button for value and set inner html value.


$("input[@name='property_type']").change(function() {
 if ($("input[@name='property_type']:checked").val() == 'aroom') {
  // Code for handling value 'aroom'
  value = 'Radio Button as follows';
  value = value + '< input type="radio" name="property_shared" id="property_shared" value="yes" checked="checked" />Yes   < input type="radio" name="property_shared" id="property_shared" value="no" />No';
  $("#shared_property_option").html(value);
 }
 else { // Code for handling value for else case.
  $("#shared_property_option").html('');
 }
});

Thursday 22 July 2010

Trim Function in Javascript

// Trim in Javascript, JQuery, Trim in JQuery
//this.replace(/^\s*/, "").replace(/\s*$/, "")
pc6_summary = ($('#pc6-summary').val()).replace(/^\s*/, "").replace(/\s*$/, "");
room_title = ($('#room_title').val()).replace(/^\s*/, "").replace(/\s*$/, "");

// Implementing Trim Function for strings in JQuery, Trim Function for strings in Javascript, a trim function for strings in javascript
< script language="JavaScript" type="text/javascript" >

String.prototype.trim = function () {
return this.replace(/^\s*/, "").replace(/\s*$/, "");
}
var s = new String(" Hello ");
// use it like this
s=s.trim();
alert("!" + s + "!");
// end hiding contents -->
< /script >

Monday 5 July 2010

SLC Result 2066/67, 2010 has been published, to view result goto http://www.nepalipathshala.com/slc

School Leaving Certificate (SLC) examination result 2066/2067 (2010 AD) has been just published on 02 July 2010...
School Leaving Certificate (SLC) examination result 2066/2067 (2010 AD) has been just published 02 July 2010...

For details information, please do LogOn to http://www.nepalipathshala.com/slc,

Best of luck for better result to you !!!