Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
mala slika koja otvara veću

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side
View previous topic :: View next topic  
Author Message
štrumfhoza



Joined: 24 Feb 2005
Posts: 89

PostPosted: 26.08.2005 08:43    Post subject: mala slika koja otvara veću Add user to your forum ignore list Reply with quote

dakle. možda može tko reći kako se radi slijedeće;

želim na sajtu imati sličice (kao recimo thumb) a da se klikom na nju otvori, u svom prozoru, ista ta veća.. jel se to radi s html-om ili je to stvar koju radi javas...?

tenks!
Back to top
View user's profile Send private message
jurka



Joined: 26 Aug 2004
Posts: 1088
Location: Zagreb

PostPosted: 26.08.2005 09:29    Post subject: Add user to your forum ignore list Reply with quote

onako na brzinu:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->
</script>
</head>

<body>
<a href="javascript:;" onclick="MM_openBrWindow('path/do-velike-slike.jpg','','')">
<img src="path/do-male-slike.jpg" width="70" height="70" border="0">
</a>
</body>
</html>

_________________
Jedan šest | Behance | Vimeo
Back to top
View user's profile Send private message Visit poster's website
che.UP
mi3.crew


Joined: 07 Sep 2003
Posts: 2320
Location: zagreb

PostPosted: 26.08.2005 10:33    Post subject: Add user to your forum ignore list Reply with quote

ovak malo detaljnije... da ne zakidas usere koji nemaju js ukljucen

Code:
<a href="velikaslika.jpg" onclick="window.open(this.href, name, features); return false;"><img src="malaslika.jpg" /></a>

_________________
UP | TypeTester | Accommodations App
Meni u Firefox-u ne radi AJAX
Back to top
View user's profile Send private message Visit poster's website
štrumfhoza



Joined: 24 Feb 2005
Posts: 89

PostPosted: 26.08.2005 10:37    Post subject: Add user to your forum ignore list Reply with quote

junačko znanje nema što.

hvala za odgovore!
Back to top
View user's profile Send private message
lekke



Joined: 17 Jun 2004
Posts: 860
Location: 25th floor

PostPosted: 26.08.2005 13:01    Post subject: Add user to your forum ignore list Reply with quote

che.UP wrote:
ovak malo detaljnije... da ne zakidas usere koji nemaju js ukljucen

Code:
<a href="velikaslika.jpg" onclick="window.open(this.href, name, features); return false;"><img src="malaslika.jpg" /></a>


DOM scripting! restepka!

Ja sve cekam 12/09/2005 da izadje Keithova knjiga... ono gad dem da je bar prije izasla, sad idem na sluzbeni put i bas bi nekaj interesantno cital Smile

_________________
You need more bass.
Back to top
View user's profile Send private message
štrumfhoza



Joined: 24 Feb 2005
Posts: 89

PostPosted: 02.09.2005 14:49    Post subject: Add user to your forum ignore list Reply with quote

e. a da li možda netko zna kako da mala slika otvori veću u novom prozoru koji je velik kao slika?
Back to top
View user's profile Send private message
Martina



Joined: 04 Jan 2004
Posts: 78
Location: Rijeka

PostPosted: 02.09.2005 19:08    Post subject: Add user to your forum ignore list Reply with quote

Ja koristim ovo u head:

Code:
<script type="text/javascript">

<!--
var nWin;
function Prozor(file,myname,w,h,scroll){
        LeftPosition = (screen.width) ? (screen.width-w)/1.1 : 0;
        TopPosition = (screen.height) ? (screen.height-h)/1.5 : 0;
        settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=1';
        if (nWin){nWin.close();}
        nWin = window.open(file,myname,settings);
        nWin.focus();
}

//-->
</script>

A onda u body:

Code:
<a onClick="Prozor('velikaslika.jpg','proz',x,y,'no')"><img src="malaslika.jpg" border="0"  style="cursor: hand;"></a>

x i y - staviš dimenzije te velike slike. Inače meni je ovo jako dobro jer si možeš odrediti i gdje da ti se novi prozor na ekranu otvori (po mogućnosti gdje ti pokriva najmanje sadržaja) i za svaku malu sliku daš novi link sa novim dimenzijama velike ako ti treba. Više thumbova ti se otvara u istom prozoru s time da se oni miču u pozadinu kad klikneš na glavnu stranicu i ponovo se dižu ispred kad ih se pozove.

_________________
Prospekt d.o.o.!
Back to top
View user's profile Send private message Visit poster's website
che.UP
mi3.crew


Joined: 07 Sep 2003
Posts: 2320
Location: zagreb

PostPosted: 03.09.2005 10:57    Post subject: Add user to your forum ignore list Reply with quote

Code:
<a href="velikaslika.jpg" onclick="window.open(this.href, name, features); return false;"><img src="malaslika.jpg" /></a>


features kojeg prima window.open funkcija je string u kojem mozes odrediti dodatne parametre novootvorenog prozora. ovdje imas napisano sto sve moze tu doc.

znaci trebi treba nesto poput
Code:
<a href="velikaslika.jpg" onclick="window.open(this.href, name, "height=200,width=400"); return false;"><img src="malaslika.jpg" /></a>


te dimenzije, naravno, moras rucno upisivat posto javascript ne moze procitati dimenzije neke slike. druga je stvar ako koristis recimo php pa odma u letu pises prave dimenzije prozora...

_________________
UP | TypeTester | Accommodations App
Meni u Firefox-u ne radi AJAX
Back to top
View user's profile Send private message Visit poster's website
štrumfhoza



Joined: 24 Feb 2005
Posts: 89

PostPosted: 03.09.2005 21:51    Post subject: Add user to your forum ignore list Reply with quote

fala ljudi.
che fakat si ljudna Wink
Back to top
View user's profile Send private message
che.UP
mi3.crew


Joined: 07 Sep 2003
Posts: 2320
Location: zagreb

PostPosted: 04.09.2005 00:01    Post subject: Add user to your forum ignore list Reply with quote

štrumfhoza wrote:
che fakat si ljudna Wink


ajoj Embarassed tnx Embarassed

Smile

_________________
UP | TypeTester | Accommodations App
Meni u Firefox-u ne radi AJAX
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group