Showing posts with label firefox. Show all posts
Showing posts with label firefox. Show all posts
Tuesday, October 20, 2009
Tuesday, October 13, 2009
vaccum a firefox sqlite database
in the firefox-error console type the following:
in the firefox profiles folder. look for: *.sqlite
Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL("VACUUM");
in the firefox profiles folder. look for: *.sqlite
Tuesday, June 02, 2009
Cross Browser Compatible Javascript DOMelement function
In the past... you had to do
//------------
//------------
to create a dom element... and it only worked in firefox. to get one that works in internet explorer you have to do:
//------------
//------------
include the function below, and it will work in both browsers:
//------------
//------------
//------------
var a = document.createElement('div');
a.setAttribute('class','myclass');
a.setAttribute('id','id_mydiv');
document.getElementById('otherdiv').appendChild(a);
a.setAttribute('class','myclass');
a.setAttribute('id','id_mydiv');
document.getElementById('otherdiv').appendChild(a);
//------------
to create a dom element... and it only worked in firefox. to get one that works in internet explorer you have to do:
//------------
var a;
try {
a = document.createElement('<div class=myclass id=id_mydiv>');
}
catch(e) {
a = document.createElement('div');
a.setAttribute('class','myclass');
a.setAttribute('id','id_mydiv');
}
document.getElementById('otherdiv').appendChild(a);
try {
a = document.createElement('<div class=myclass id=id_mydiv>');
}
catch(e) {
a = document.createElement('div');
a.setAttribute('class','myclass');
a.setAttribute('id','id_mydiv');
}
document.getElementById('otherdiv').appendChild(a);
//------------
include the function below, and it will work in both browsers:
//------------
var a = DOMelement('div','class':'myclass','id':'id_mydiv');
document.getElementById('otherdiv').appendChild(a);
document.getElementById('otherdiv').appendChild(a);
//------------
function DOMelement(elementname,attributes)
{
var htmlspecial = function(tmp_str){
var histogram = {"&":"&","'":"'", "\"":""","<":"<",">":">"};
for (symbol in histogram)
tmp_str = tmp_str.split(symbol).join(histogram[symbol]);
return tmp_str;
}
var element;
try{
var attribute_str = '';
for(attribute_name in attributes)
if (attribute_name!='text')
attribute_str+= attribute_name+"='"+htmlspecial(o.attributes[attribute_name])+"'";
element = document.createElement("<"+elementname+" "+attribute_str + ">");//IE
}catch (e){
element = document.createElement( elementname );
for(attribute_name in attributes)
if (attribute_name!='text')
element.setAttribute( attribute_name , attributes[attribute_name] );
}
if (attributes && attributes['text'])
element.innerHTML = attributes['text'];
return element;
}
{
var htmlspecial = function(tmp_str){
var histogram = {"&":"&","'":"'", "\"":""","<":"<",">":">"};
for (symbol in histogram)
tmp_str = tmp_str.split(symbol).join(histogram[symbol]);
return tmp_str;
}
var element;
try{
var attribute_str = '';
for(attribute_name in attributes)
if (attribute_name!='text')
attribute_str+= attribute_name+"='"+htmlspecial(o.attributes[attribute_name])+"'";
element = document.createElement("<"+elementname+" "+attribute_str + ">");//IE
}catch (e){
element = document.createElement( elementname );
for(attribute_name in attributes)
if (attribute_name!='text')
element.setAttribute( attribute_name , attributes[attribute_name] );
}
if (attributes && attributes['text'])
element.innerHTML = attributes['text'];
return element;
}
Wednesday, January 28, 2009
How to add mdbg search for firefox search bar
Include the following file in your searchplugins folder
on windows: C:\Program Files\Mozilla Firefox\searchplugins
mdbg.xml
on windows: C:\Program Files\Mozilla Firefox\searchplugins
mdbg.xml
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>MDBG</ShortName>
<Description>MDBG Character Lookup</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/x-icon;base64,AAABAAIAEBAQAAAAAAAoAQAAJgAAACAgEAAAAAAA6AIAAE4BAAAoAAAAEAAAACAAAAABAAQAAAAAAIAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/AAAA//8A/wAAAP8A/wD//wAA////APAAAP//AA//8P//D/D/8P/w//8PD///D/D//w8P/wAP8AAADw/////w//8PD///D/D//w/w//D/8AAA//8AD//w/w/w8AAP//D/D/Dw//D/8PDw8PD//w/w8PDw8P//D/Dw8PDw//8P8A//APD//w/wD/8A8P/w//D///DwAA//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAgAAAAQAAAAAEABAAAAAAAAAIAAAAAAAAAAAAAEAAAABAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8A//////////////////////8AAAAAAP////8AAAD/////AAAAAAAP//8AAAAAAP///wAP//8AAP/wAA//8AAP//8AD///8AD/8AD///8AD///AA////AA/wAP////AA///wAP//8AAP8AD//wAAAP//8AAAAAAA//AA//8AAAD///AAAAAAD//wAP/////////wAP//8AD/8AD/////////8AD///AA//AA////8AD///AA///wAP//AA///wAP///wAP//8AD//wAA//AAD///8AAAAAAA///wAAAAAP////AAAAAA//////AAAA////////////////////////////////////////////////AA//AP/wAP8AAAAAD////wAP8AAP8AD/AAAAAAD///8AD/AAD/AA/wAP//AAD///AA/wAA/wAP8AD///AA///wAP8AAP8AD/AA////AA//8ADwAAAPAA/wAP///wAP//AA8A/wDwAP8AD///8AD//wAPAP8A8AD/AA////AA//8ADwD/APAA/wAP///wAP//AAAA/wAAAP8AD///8AD//wAAD//wAAD/AA///wAP//8AAA//8AAA/wAP//AAD///AAAP//AAAP8AAAAAAP///wAAD///AAD/AAAAAA////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</Image>
<Url type="text/html" method="GET" template="http://www.mdbg.net/chindict/chindict.php?page=chardict&cdcanoce=0&cdqchi={searchTerms}&cddmtm=1&cddytm=0"/>
<SearchForm>http://mdbg.com/</SearchForm>
</SearchPlugin>
<ShortName>MDBG</ShortName>
<Description>MDBG Character Lookup</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/x-icon;base64,AAABAAIAEBAQAAAAAAAoAQAAJgAAACAgEAAAAAAA6AIAAE4BAAAoAAAAEAAAACAAAAABAAQAAAAAAIAAAAAAAAAAAAAAABAAAAAQAAAAAAAAAAAAgAAAgAAAAICAAIAAAACAAIAAgIAAAICAgADAwMAAAAD/AAD/AAAA//8A/wAAAP8A/wD//wAA////APAAAP//AA//8P//D/D/8P/w//8PD///D/D//w8P/wAP8AAADw/////w//8PD///D/D//w/w//D/8AAA//8AD//w/w/w8AAP//D/D/Dw//D/8PDw8PD//w/w8PDw8P//D/Dw8PDw//8P8A//APD//w/wD/8A8P/w//D///DwAA//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAgAAAAQAAAAAEABAAAAAAAAAIAAAAAAAAAAAAAEAAAABAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//AAD///8A//////////////////////8AAAAAAP////8AAAD/////AAAAAAAP//8AAAAAAP///wAP//8AAP/wAA//8AAP//8AD///8AD/8AD///8AD///AA////AA/wAP////AA///wAP//8AAP8AD//wAAAP//8AAAAAAA//AA//8AAAD///AAAAAAD//wAP/////////wAP//8AD/8AD/////////8AD///AA//AA////8AD///AA///wAP//AA///wAP///wAP//8AD//wAA//AAD///8AAAAAAA///wAAAAAP////AAAAAA//////AAAA////////////////////////////////////////////////AA//AP/wAP8AAAAAD////wAP8AAP8AD/AAAAAAD///8AD/AAD/AA/wAP//AAD///AA/wAA/wAP8AD///AA///wAP8AAP8AD/AA////AA//8ADwAAAPAA/wAP///wAP//AA8A/wDwAP8AD///8AD//wAPAP8A8AD/AA////AA//8ADwD/APAA/wAP///wAP//AAAA/wAAAP8AD///8AD//wAAD//wAAD/AA///wAP//8AAA//8AAA/wAP//AAD///AAAP//AAAP8AAAAAAP///wAAD///AAD/AAAAAA////////////////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==</Image>
<Url type="text/html" method="GET" template="http://www.mdbg.net/chindict/chindict.php?page=chardict&cdcanoce=0&cdqchi={searchTerms}&cddmtm=1&cddytm=0"/>
<SearchForm>http://mdbg.com/</SearchForm>
</SearchPlugin>
Sunday, April 08, 2007
HTML: Website blank in IE, fine in Firefox
I coded up a website in firefox but it wouldn't show in IE. I was trying to make it xHTML-ish, and had the script tag looking like this:
For some idiot reason, IE chokes on the whole page, unless it looks like this:
source:
http://www.webmasterworld.com/html/3249762.htm
<script language='JavaScript' type='text/JavaScript'
src='script.js'/>For some idiot reason, IE chokes on the whole page, unless it looks like this:
<script language='JavaScript' type='text/JavaScript'
src='script.js'></script>
source:
http://www.webmasterworld.com/html/3249762.htm
Subscribe to:
Posts (Atom)
