andrisp Posted August 12, 2005 Report Posted August 12, 2005 function popup(mylink, windowname, width, height) { window.open(mylink, windowname, 'width='+width+',height='+height+',scrollbards=no'); } href="java script:popup('blabla.html', 'blabla', 600, 600);" varat pateikt kaapee uz IE nestraadaa ? saka "Error on page"; Firefox un Operaa straadaa lieliski
andrisp Posted August 12, 2005 Author Report Posted August 12, 2005 (edited) wtf is "scrollbards" ? 20833[/snapback] njaa.. bet šits vienalga saka ka error on page Edited August 12, 2005 by andrisp
bubu Posted August 12, 2005 Report Posted August 12, 2005 Kļūda tev nav tajās 3 rindiņās, bet kautkur citur. Man uz IE strādā, kā vajag: <html><head> <script> function popup(mylink, windowname, width, height) { window.open(mylink, windowname, 'width='+width+',height='+height+',scrollbards=no'); } </script> </head><body> <a href="javascript:popup('a.html', 'blabla', 600, 600);">bla</a> </body></html>
Venom Posted August 12, 2005 Report Posted August 12, 2005 a href="java script:" is evil a [href=#] onclick="popup()"
andrisp Posted August 12, 2005 Author Report Posted August 12, 2005 nesaprotu.. uz IE nestraadaa neviena no shiim metodeem.. vai nu IE vienkaarshi ignoree vai arii "Error on page", uz Operas un FF gan pilniigi visas straadaa stulbums kautkaads
PheliX Posted August 12, 2005 Report Posted August 12, 2005 a href="java script:" is evila [href=#] onclick="popup()" 20839[/snapback] a... KAAPEEC evil?
bubu Posted August 12, 2005 Report Posted August 12, 2005 Manā izpratnē tāpēc, ka čakarē protokola daļu ("java script:"). Vecāki browseri var domāt, ka tas ir URL'is.
Venom Posted August 12, 2005 Report Posted August 12, 2005 labs variants ir kad popup f-ja atgriež false ja ir atvērusi logu un true, ja nē, bet popup-linku pareizi viedot ir ar function popup(elt) { try { window.popup(elt.href,'title'); return false; } catch(e) { return true; } } <a href="links.php?param" [target=_blank] onclick="return popup(this)"> ja javascripts nenostrādā - aiziet links, ja nostrādā - "atceļ" pāriešanu pa linku
andrisp Posted August 12, 2005 Author Report Posted August 12, 2005 probleema saakotneejaa piemeera bija, ka windowname bija jaaiekljauj peedinjaas.
bubu Posted August 12, 2005 Report Posted August 12, 2005 A tev taču bija: href="java script:popup('blabla.html', 'blabla', 600, 600);"
andrisp Posted August 12, 2005 Author Report Posted August 12, 2005 A tev taču bija: 20853[/snapback] window.open(mylink, [B]'windowname'[/B], 'width='+width+',height='+height+',scrollbards=no'); kad shitam pievienoju peedinjas tad viss straadaaja normaali.
bubu Posted August 12, 2005 Report Posted August 12, 2005 A tu saproti, ka tad tas funkcijas parametrs neņemsies vērā?
andrisp Posted August 12, 2005 Author Report Posted August 12, 2005 hmm, taa gan.. bet nesaprotu, kaapeec tad bez peedinjaam nestraadaa vispaar.. IE error pazinjojums ir "Invalid argument".
bubu Posted August 12, 2005 Report Posted August 12, 2005 Vai tu esi pārliecināts, ka pareizi parametru nodod tai funkcijai? Tev mans piemērs uz IE iet? Ja jā - tad meklē atšķirību savā kodā izsaukumam.
Recommended Posts