andrisp Posted August 12, 2005 Report Share 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 Link to comment Share on other sites More sharing options...
Analgiins Posted August 12, 2005 Report Share Posted August 12, 2005 wtf is "scrollbards" ? Link to comment Share on other sites More sharing options...
andrisp Posted August 12, 2005 Author Report Share 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 Link to comment Share on other sites More sharing options...
bubu Posted August 12, 2005 Report Share 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> Link to comment Share on other sites More sharing options...
Venom Posted August 12, 2005 Report Share Posted August 12, 2005 a href="java script:" is evil a [href=#] onclick="popup()" Link to comment Share on other sites More sharing options...
andrisp Posted August 12, 2005 Author Report Share 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 Link to comment Share on other sites More sharing options...
PheliX Posted August 12, 2005 Report Share Posted August 12, 2005 a href="java script:" is evila [href=#] onclick="popup()" 20839[/snapback] a... KAAPEEC evil? Link to comment Share on other sites More sharing options...
bubu Posted August 12, 2005 Report Share 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. Link to comment Share on other sites More sharing options...
Venom Posted August 12, 2005 Report Share 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 Link to comment Share on other sites More sharing options...
andrisp Posted August 12, 2005 Author Report Share Posted August 12, 2005 probleema saakotneejaa piemeera bija, ka windowname bija jaaiekljauj peedinjaas. Link to comment Share on other sites More sharing options...
bubu Posted August 12, 2005 Report Share Posted August 12, 2005 A tev taču bija: href="java script:popup('blabla.html', 'blabla', 600, 600);" Link to comment Share on other sites More sharing options...
andrisp Posted August 12, 2005 Author Report Share 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. Link to comment Share on other sites More sharing options...
bubu Posted August 12, 2005 Report Share Posted August 12, 2005 A tu saproti, ka tad tas funkcijas parametrs neņemsies vērā? Link to comment Share on other sites More sharing options...
andrisp Posted August 12, 2005 Author Report Share Posted August 12, 2005 hmm, taa gan.. bet nesaprotu, kaapeec tad bez peedinjaam nestraadaa vispaar.. IE error pazinjojums ir "Invalid argument". Link to comment Share on other sites More sharing options...
bubu Posted August 12, 2005 Report Share 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. Link to comment Share on other sites More sharing options...
Recommended Posts