[javascript] witte rand om plaatje weg halen

Pagina: 1
Acties:

  • Martink
  • Registratie: Juni 2001
  • Laatst online: 11-02-2025
ik heb nu
code:
1
2
3
4
5
6
function showpic( the_file, the_width, the_height, name ) {
    propertystring = "height=" + the_height + ",width=" + the_width + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resize=yes,resizable=0";
    win = document.open("about:", "", propertystring);
    win.document.title = name;
    win.document.body.innerHTML = '<html><body bgProperties=fixed leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"><center>[img]"'[/img]</center></body></html>'
    }

die opent popup window net zo groot als plaatje maar ik dacht dat ik in <body tag de witte rang weg te kunnen halen maar dat werkt niet :( hoe kan ik dat oplossen?

  • Thijsmans
  • Registratie: Juli 2001
  • Laatst online: 08:51

Thijsmans

⭐⭐⭐⭐⭐ (5/5)

leftmargin en topmargin zouden moeten werken, misschien ligt het aan de hoofdletters?

[edit]

of aan de center tags, die zijn toch niet nodig als je het venster even groot maakt als het plaatske?

Privacy-adepten vinden op AVGtekst.nl de Nederlandse AVG-tekst voorzien van uitspraken en besluiten.


  • Annie
  • Registratie: Juni 1999
  • Laatst online: 25-11-2021

Annie

amateur megalomaan

code:
1
2
3
4
5
6
7
8
function showpic( the_file, the_width, the_height, name ) {
    propertystring = "height=" + the_height + ",width=" + the_width + ",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resize=yes,resizable=0";
    win = window.open("about:", "", propertystring);
    win.document.title = name;
    win.document.open();
    win.document.write ('<html><body bgProperties=fixed leftMargin=0 topMargin=0 marginheight="0" marginwidth="0"><center>[img]"'[/img]</center></body></html>');
    win.document.close();
    }

niet getest (dus er kunnen kleine foutjes inzitten), maar is sowieso logischer dan de innerHTML property van de <body> te wijzigen en daarbinnen weer opnieuw te beginnen met "<html><body>".

Today's subliminal thought is:


  • Martink
  • Registratie: Juni 2001
  • Laatst online: 11-02-2025
Ja! werkt prima!