Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> img resize, otwiera wszystkie obrazki
deniol13
post
Post #1





Grupa: Zarejestrowani
Postów: 190
Pomógł: 2
Dołączył: 30.11.2009

Ostrzeżenie: (10%)
X----


Cytat
function addEvent( obj, type, fn ) {
if ( obj.attachEvent ) {
obj['e'+type+fn] = fn;
obj[type+fn] = function(){obj['e'+type+fn]( window.event );}
obj.attachEvent( 'on'+type, obj[type+fn] );
} else
obj.addEventListener( type, fn, false );
}

function resizeImg( handle )
{
var orig_x = handle.width;
var orig_y = handle.height;

if( handle.width > 600 )
{
handle.width = 600;
addEvent( this, 'click', function() { window.open( handle.src, handle.src,"location=1,status=1,scrollbars=1,width=100,height=100" ); } );
handle.className = 'img_resized';
}
}


mam taki kod, dziala a stosuje go tak
Cytat
onClick="resizeImg( this );"


po kliknieciu w obrazek, otwiera mi wszystkie ktore ulegly resizeowi


nie wazne gdzie klikne, i tak sie wszystkie otworza sad.gif

Ten post edytował deniol13 19.10.2010, 18:06:00
Go to the top of the page
+Quote Post

Posty w temacie
- deniol13   img resize   19.10.2010, 18:02:02
- - kamil4u   Wspaniałe pytanie... - pisz tak, żeby nie trzeba b...   19.10.2010, 18:54:33


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 07:19