popup i gallery
Hep hey, jeg har et problem med mit billede gallery, når man klikker på billederne så kommer de i samme vindue... jeg vil godt have sådan at det popper op i ramme som er 640'480 uden adresse linje osv... :) håber i kan hjælpe...KODE
<script type="text/JavaScript">
var billede;
function NewWindow(url) {
var streng="<html><body leftmargin=0 topmargin=0 bgcolor=#000000>";
streng+='<img src=\"'+url+'\"></body></html>';
billede = new Image();
billede.src = url;
var t = new Date().getTime();
var hojde = (billede.height+30)
var bredde = (billede.width+10)
var horisontal = (screen.width - bredde)/2;
var vertikal = (screen.height - hojde)/2;
win = window.open('','link'+t,'height='+ hojde + ',width=' + bredde + ', top=' + vertikal + ', left='+horisontal)
win.document.open();
win.document.write(streng);
win.document.close();
win.resizeTo (bredde, hojde)
}
</script>
<font size="2"><font face="Verdana, Arial, Helvetica, sans-serif"><body style="background-image: url(../images/iframe.gif); background-attachment: fixed; color: white;">
<font color="#000000">
<%
'------------------------------------------------
'henter info om siden
'------------------------------------------------
page = trim(Request.QueryString("page"))
start = trim(Request.QueryString("start"))
'------------------------------------------------
'Åbner Filsystem
'------------------------------------------------
strPathInfo = Request.ServerVariables("PATH_INFO")
strPhysicalPath = Server.MapPath(strPathInfo)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile(strPhysicalPath)
Set objFolder = objFile.ParentFolder
Set objFolderContents = objFolder.Files
'------------------------------------------------
'grund variabler
'------------------------------------------------
row_count = 0
row = 1
max_row = 3
count = 1
If NOT start <> "" then
Start = 1
End If
%>
</font>
<p align=center> <font color="#000000">
<%
'------------------------------------------------
'Info variabler
'------------------------------------------------
info_page = 0
info_page_count = 0
info_Count = 0
'------------------------------------------------
'Info Script, udregner og udskriver info til siden
'------------------------------------------------
If page <> "" then
response.write "side <a href='pics.asp'>1</a> "
else
Response.write "side 1 "
End If
For Each objFileItem in objFolderContents
info_Count = info_Count + 1
info_page = info_page + 1
if info_page = 9 then
info_page_count = info_page_count + 1
info_page = 0
End If
If info_page = 0 then
If trim(info_page_count + 1) = trim(page) then
response.write info_page_count + 1 & " "
Else
response.write "<a href='pics.asp?start=" & info_count & "&page=" & info_page_count + 1 & "'>" & info_page_count + 1 & "<a> "
End If
End If
Next
Response.write "<br>Der er ialt <b>" & (info_Count) & "</b> billeder"
if (info_page_count) * 9 = info_count then
Response.write " på <b>" & (info_page_count) & "</b> sider<br>"
Else
Response.write " på <b>" & (info_page_count) + 1 & "</b> sider<br>"
End If
%>
</font><font color="#000000"><div align="center"> </font>
<table border="0" cellspacing="3" cellpadding="3">
<tr>
<%
For Each objFileItem in objFolderContents
If objFileItem.Name = "pics.asp" then
Else
If CLng(count) < CLng(start) then
count = count + 1
Else
If CLng(row) => CLng(max_row) And row_count = 3 then
Else
If row_count > 2 then
response.write "<tr>"
row_count = 0
row = row + 1
End If
Response.write " <td><a href='"
Response.Write(objFileItem.Name)
Response.write "'><img border=0 src='" & (objFileItem.Name) & "' alt='" & (objFileItem.Name) & "' width=120 height=80></a>"
row_count = row_count + 1
count = count + 1
End If
End If
End If
Next
%>
<font color="#000000"></td></font></tr>
</table>
</font></font>
KODE SLUT!
