Monday, September 26, 2011

Replacing space with underscore in Javascript

I tried providing a title for a custom javascript dojo component but it took only the first word i guess this was because space was not being handled properly so i searche dfor javascript code to replace space with &nbsp. Following is the code

.split(' ').join('_')

Wednesday, September 21, 2011

MYSQL

Changing root password for MySQL : Change root password for MySQL
Command to import an sql dump file : mysql -u username -p password database_name < filename.sql  
MySQL employees database link :MySQL Employees Database Link

Sunday, September 11, 2011

CSS Related

// Entry for style for all elements having an id myid
#myid {
             width:550px; some-other-attribute: some-value;
}
// Entry for style for all elements having class myclass
.myclass {
width:550px; some-other-attribute: some-value;
}
// Entry for style for a tag in html body
body {
width:550px; some-other-attribute: some-value;
}
You can use divs with the float: left; attribute which will make them appear horizontally next to each other, but then you may need to use clearing on the following elements to make sure they don't overlap.  Adding Options to Select Element in Html

Adding inner html to an element in Html
document.getElementById('boldStuff').innerHTML = 'Fred Flinstone';
 
http://www.javascriptkit.com 
 
http://www.hunlock.com/blogs/Functional_Javascript