Catégorie web - posté le 18/08/09 21:40:03
<script type="text/javascript" src="js/01.js"></script>Note pour plus tard: vérifiér la légalité de la chose... :x
<script type="text/javascript" src="js/02.js"></script>
<script type="text/javascript" src="js/3.js"></script>
<script type="text/javascript" src="js/google/04.js"></script>
<script type="text/javascript" src="js/05.js"></script>
Catégorie kmymoney - posté le 10/08/09 10:59:44
Catégorie javascript - posté le 03/08/09 23:05:35
// GetXPath
// Cross browser
function xpath(path)
{
if(this.xmlDoc.evaluate)
{
return this.xmlDoc.evaluate(
this.prefix+path,
this.xmlDoc,
null,
XPathResult.ORDERED_NODE_SNAPSHOT_TYPE ,
null
);
}
else
{
return this.xmlDoc.selectNodes(this.prefix+path);
}
},
// XPath result item
// Cross browser
function xpathItem(elt, i)
{
if(elt.snapshotLength)
{
return elt.snapshotItem(i);
}
return elt[i];
},
// XPath result length
// Cross browser
function xpathLength(elt)
{
if(elt.snapshotLength)
{
return elt.snapshotLength
}
return elt.length;
},
Comment utiliser ces fonctions?
var resultats = xpath('/MON/CHEMIN[@monparametre=\'valeur\']');
for(var i= 0; i< xpathlength(resultats); i++)
{
// on utilise ici le résultat avec
// xpathItem(resultats,i);
}
Catégorie kmymoney - posté le 31/07/09 12:34:06
0 commentaire(s) javascript ajax kmymoney web dhtml comptes argent
Catégorie web - posté le 03/07/09 22:36:49
<img src="data:image/png;base64,iVBORw0KGgoAAAANSU
hEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAA
AAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+
IAAAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q
72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQ
g2JoQ9LE1exdlYvBBeZ7jqch9//q1uH4TLzw4d6+ErXMMcXuHW
xId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAA
BJRU5ErkJggg==" alt="image point rouge">
Catégorie javascript - posté le 17/06/09 21:08:42
var links=document.getElementsByTagName('link');
for (i=0;i<links.length;i++)
{
links[i].parentNode.removeChild(links[i]);
}
Ajouter un style:var link = document.createElement('link');
link.href='/style.css';
link.type='text/css';link.rel='stylesheet';
document.getElementsByTagName('head')[0].appendChild(link);
Suite au commentaire de kapouik, vous pouvez aussi visiter la page d'exemple.
Catégorie Javascript - posté le 08/03/09 10:39:07
function creation_barre_chargement( lien)Un exemple d'appel est disponible sur cette page: barre de chargement pourcentage en javascript.
{
// Creation du fond grisé
var back= document.createElement('DIV');
back.style.position='absolute';
back.style.top='0px';
back.style.left='0px';
back.style.width='100%';
back.style.height='100%';
back.style.background='white';
back.style.opacity='0.8';
back.style.filter='alpha(opacity=80)';
// Creation de la barre de chargement
var div= document.createElement('DIV');
div.style.position='absolute';
div.id='barre_chargement';
div.style.width='40%';
div.style.marginLeft='30%';
div.style.marginTop='10%';
div.style.border="1px solid black";
div.style.background="#d0d0d0";
div.style.height='20px';
// Creation de l'avancement de la barre de chargement
var p= document.createElement('P');
p.style.margin='0px';
p.style.width='0px';
p.style.padding='0px';
p.style.borderLeft='1px solid #333';
p.style.height='100%';
p.style.background='green';
p.style.fontWeight='bold';
p.id='pourcentage_accompli';
p.style.textAlign='right';
// Texte de l'avancement de la barre de chargement
var txt= document.createTextNode('0%');
// Ajout des elements DOM
p.appendChild(txt);
div.appendChild(p);
back.appendChild(div);
document.body.appendChild(back);
// Gestion de la récuperation du fichier
myAjax=new Ajax.Request( lien.href, {
method: 'get',
onInteractive : function(response)
{
if(response.getHeader('Content-Length')!='')
{
var pourcentage=$('pourcentage_accompli').getWidth()/$('barre_chargement').getWidth()*100;
pourcentage+=1;
}
else
{
var pourcentage= myAjax.transport.responseText.length/response.getHeader('Content-Length')*100;
}
if(pourcentage>100)
{
pourcentage=0;
}
$('pourcentage_accompli').style.width=pourcentage+'%';
$('pourcentage_accompli').firstChild.nodeValue=pourcentage.toFixed(2)+'%';
},
onSuccess: function() {
document.location.href='#'+lien.href;
document.body.update(myAjax.transport.responseText);
}
});
}
Event.observe(window, 'load', function()
{
$$('.loading_item').each(
function(item)
{
item.onclick= function() { creation_barre_chargement(item); return false; }
}
);
});
$html="
blah blah blah
bah blah blah
bah blah blah
blah blah bla
blah blah bla
";
header("Content-Length:".strlen($html));
foreach(preg_split("/[\r\n]/",$html) as $v_text)
{
print "$v_text\n";
flush();
sleep(1);
}
4 commentaire(s) javascript ajax loading dhtml chargement pourcentage barre
Catégorie Web - posté le 26/08/08 21:44:15
Catégorie Développement - posté le 30/07/08 19:22:32
var cells = document.querySelectorAll("#score>tbody>tr>td:nth-of-type(2)");
Comme vous l'aurez compris, il s'agit de sélectionner les éléments via leur hiérarchie, comme l'émulait les librairies telles que prototype...
Catégorie Web - posté le 14/05/08 23:12:36
Encore une fois, google nous facilite le développement Web: cette fois-ci, nous avons droit à tout un emsemble de documentation et trucs & astuces, aussi bien sur le DOM, que sur les CSS.
À quand le framework complet google?