wanted to save myself the problem of adding the code to all the pages i use to show the favicon so i researched it. this is how it is added to the .htaccess file:
AddType image/x-icon .ico
RewriteRule ^favicon.ico favicon.ico [NC,L]
the icon has to be in the root of the server files
As a programmer, there are no real problems but challenges...ones that we need to overcome. This means that there is a solution for all challenges that one may face. For all the challenges that I have faced, I will share them and their solutions.
Friday, January 29, 2010
Friday, January 22, 2010
Add multiple rows dynamically with javascript
this function can be modified to take the amount of rows to create. i just hard coded the amount due to time :D
javascript code
function addTableCell(tblElement)
{
var tbl = document.getElementById(tblElement);
var celTitle = "Session Title";
var cellName = "session_title";
for( var n = 0; n < lastrow =" tbl.rows.length;" iteration =" lastRow;" row =" tbl.insertRow(lastRow);" titlecell =" row.insertCell(0);" titlelabel =" document.createTextNode(celTitle);" cellright2 =" row.insertCell(1);" el2 =" document.createElement('input');" type =" 'text';" name =" cellName" size =" '30';" class =" 'flatTextbox';" celtitle = "Session Description" cellname = "session_desc" n =" 0;" tbl =" document.getElementById(tblElement);" tbl =" document.getElementById('addcell');" lastrow =" tbl.rows.length;"> 1) tbl.deleteRow(lastRow - 1);
//if (lastRow > 3) tbl.deleteRow(lastRow - 1);
}
}
html code
this was in another table. highlight and view code for fields and buttons
and this is the code to accomplish adding and removing the last inserted fields
javascript code
function addTableCell(tblElement)
{
var tbl = document.getElementById(tblElement);
var celTitle = "Session Title";
var cellName = "session_title";
for( var n = 0; n < lastrow =" tbl.rows.length;" iteration =" lastRow;" row =" tbl.insertRow(lastRow);" titlecell =" row.insertCell(0);" titlelabel =" document.createTextNode(celTitle);" cellright2 =" row.insertCell(1);" el2 =" document.createElement('input');" type =" 'text';" name =" cellName" size =" '30';" class =" 'flatTextbox';" celtitle = "Session Description" cellname = "session_desc" n =" 0;" tbl =" document.getElementById(tblElement);" tbl =" document.getElementById('addcell');" lastrow =" tbl.rows.length;"> 1) tbl.deleteRow(lastRow - 1);
//if (lastRow > 3) tbl.deleteRow(lastRow - 1);
}
}
html code
this was in another table. highlight and view code for fields and buttons
Session Title | |
Session Description |
and this is the code to accomplish adding and removing the last inserted fields
Sunday, January 17, 2010
interpretation of "On to the next one" - Jay-z
this video highlight some of the meanings of the symbols that jay-z uses in his video "on the next one". look out for a site that i will be doing. uogw. coming soon...............
Saturday, January 9, 2010
Subscribe to:
Posts (Atom)