Oui mais moi je le veux en asp, j'ai déja fait le meme astuce en asp.net c presque pareil que C#.J'ai trouver un bout de code mais il marche pas , meme si j'ai modifier nestcape par internet explorer mais aucun résultat:
<script language="javascript">
function MM_showHideLayers() { //v2.0
var i, visStr, args, theObj;
args = MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) { //with arg triples (objNS,objIE,visStr)
visStr = args;
if (navigator.appName == 'Netscape' && document.layers != null) {
theObj = eval(args);
if (theObj) theObj.visibility = visStr;
} else if (document.all != null) { //IE
if (visStr == 'show') visStr = 'visible'; //convert vals
if (visStr == 'hide') visStr = 'hidden';
theObj = eval(args);
if (theObj) theObj.style.visibility = visStr;
} }
}
function imprimer() {
MM_showHideLayers('document.layers[\'boutons\']','document.all[\'boutons\']','hide');
window.print();
MM_showHideLayers('document.layers[\'boutons\']','document.all[\'boutons\']','show');
}
</script>
<div id="boutons" align="center" style="position:absolute; z-index:1;visibility: visible">
<input type="button" name="bt_print" value="Imprimer" onClick="javascript:imprimer();">
</div
Ce code répond à ce que je cherche vraimen.son astuce c qu'il met le bouton dans un calque peis il cache ce calque apré l'impression.
j'aimerais pouvoir trouver pourquoi il marche pas en plus la logique, elle est bonne.
Je vous remercie pour votre aide.