16. april 2005 - 23:22
Der er
61 kommentarer og 1 løsning
Arg, nogen der vil indsætte en text for mig?
Jeg har denne kode her.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"> <html>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<script language="javascript" type="text/javascript">
function showBox(w,h,e,leftPos,topPos) {
box = document.getElementById("minDiv").style;
box.left = ((e.clientX) ? e.clientX:e.pageX)+15+"px";
box.top = ((e.clientY) ? e.clientY:e.pageY)-15+"px";
box.width = w + 'px';
box.height = h + 'px';
box.display = "block";
}
function hideBox(){
document.getElementById("minDiv").style.display = 'none';
}
function showURL(link){
window.minIframe.location.href = link.href;
}
</script>
<body>
<br>6. <a href="
http://www.newfashionstyle.com/images/justerer_tekst.gif" onmouseover="showURL(this);showBox(411,420,event,200,200,200);" onmouseout="hideBox()" onclick="return false;">
Justerer tekst</a>
<br>7. <a href="
http://www.newfashionstyle.com/images/Din_Egen_Tekst_v2.gif" onmouseover="showURL(this);showBox(411,420,event);" onmouseout="hideBox()" onclick="return false;">
Din egen tekst</a> (max. 6 linier)
<br><br>Hvis du ikke kan se ovenstående guide klik her <a target="_blank" href="
http://www.newfashionstyle.com/options_guides/"> [link]</a>
<br><hr>
<span style="font-size:x-small;font-weight:bold;">Her kan du foretage dine valg</span>
(se guiden hvis du er i tvivl)</span>
<div id="minDiv" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="about:blank" style="width:100%;height:100%;overflow:hidden;"></iframe></div>
</body>
</html>
------------------------------------------------------------------
Den vil jeg gerne have lavet her, så jeg her så at den henter det billed frem i en lille box som matcher Recordset'et....
Her er så min text:
<%
set rsCollection = server.Createobject("ADODB.Recordset")
SQL_StringCollection = "SELECT * from [collection] WHERE [item_menu]=" & request.querystring("id") & " ORDER BY [item_name] ASC"
rsCollection.open SQL_StringCollection , Conn
response.write "<table>"
Do until rsCollection.EOF
response.write "<tr>"
response.write "<td>"
response.write "<a href=""java script:var win=window.open('description.asp?id=" & rsCollection ("id") & "','','height=500,width=600,location=0,menubar=0,status=0,toolbar=0')""><font face='Verdana' size='2' color='#000000'>" & rsCollection ("item_name") & "</a>"
rsCollection.movenext
response.write "</td>"
response.write "</tr>"
loop
response.write "</table>"
%>
Annonceindlæg fra Infor
16. april 2005 - 23:33
#1
Hmm jeg forstår ikke helt præcist hvad du vil have hvor?
16. april 2005 - 23:47
#2
Jeg har fundet den øverste kode stump på nettet, den gør at man får et lille billed på når man kører ned over et link. Den kode hvor der kommer et billed op som = Id'en på mit recordset i min DB...
16. april 2005 - 23:50
#3
Så du vil have den nederste kode op i den øverste på en sådan måde at der for hvert link i den nederste kode kommer en lille box op i stedet for et helt window.open? Skal lige være sikker :o)
16. april 2005 - 23:56
#4
Ja... altså Jeg har en Database, hvor jeg har en masse Star Wars ting og sager... dem har jeg smidt i en database, hvor der er mange forskellige lister... Når man trykker på en i listen popper der et vindu op med billed, text osv.... MEN Jeg vil osse gerne have det sådan, at når man kører ned over linket på tingen, at det samme billed kommer frem, bare i en lille box UDEN at man trykker på den!
16. april 2005 - 23:59
#5
ok sådan her? ---------- ret din response.write i do løkken til ---------- response.write "<a href=""java script:var win=window.open('description.asp?id=" & rsCollection ("id") & "','','height=500,width=600,location=0,menubar=0,status=0,toolbar=0')"" onmouseover=""showURL(this);showBox(411,420,event);"" onmouseout=""hideBox()""><font face='Verdana' size='2' color='#000000'>" & rsCollection ("item_name") & "</a>" -----------
17. april 2005 - 00:00
#6
Så bør den jo kalde dit javascript og vise din div Hvis altså du putter den nederste kode op i den øverste
17. april 2005 - 00:06
#7
Jamen jeg har ikke forstand på det!
17. april 2005 - 00:12
#8
prøv følgende:
-------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"> <html>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<script language="javascript" type="text/javascript">
function showBox(w,h,e,leftPos,topPos) {
box = document.getElementById("minDiv").style;
box.left = ((e.clientX) ? e.clientX:e.pageX)+15+"px";
box.top = ((e.clientY) ? e.clientY:e.pageY)-15+"px";
box.width = w + 'px';
box.height = h + 'px';
box.display = "block";
}
function hideBox(){
document.getElementById("minDiv").style.display = 'none';
}
function showURL(link){
window.minIframe.location.href = link.href;
}
</script>
<body>
<%
set rsCollection = server.Createobject("ADODB.Recordset")
SQL_StringCollection = "SELECT * from [collection] WHERE [item_menu]=" & request.querystring("id") & " ORDER BY [item_name] ASC"
rsCollection.open SQL_StringCollection , Conn
response.write "<table>"
Do until rsCollection.EOF %>
<tr>
<td>
<a href="java script:var win=window.open('description.asp?id=<%=rsCollection("id")%>','','height=500,width=600,location=0,menubar=0,status=0,toolbar=0')" onmouseover="showURL(this);showBox(411,420,event);" onmouseout="hideBox()"><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></a>
</td>
</tr>
<% rsCollection.movenext
loop
response.write "</table>"
%>
<div id="minDiv" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="about:blank" style="width:100%;height:100%;overflow:hidden;"></iframe></div>
</body>
</html>
17. april 2005 - 00:16
#9
ok.. ser næste ud til at virke! Der kommer bare ikke noget billed i boxen!... men der kommer bare en ramme!
17. april 2005 - 00:21
#10
så prøv sådan her:
-------
prøv følgende:
-------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"> <html>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<script language="javascript" type="text/javascript">
function showBox(w,h,e,leftPos,topPos,id) {
box = document.getElementById(id).style;
box.left = ((e.clientX) ? e.clientX:e.pageX)+15+"px";
box.top = ((e.clientY) ? e.clientY:e.pageY)-15+"px";
box.width = w + 'px';
box.height = h + 'px';
box.display = "block";
}
function hideBox(){
document.getElementById("minDiv").style.display = 'none';
}
function showURL(link){
window.minIframe.location.href = link.href;
}
</script>
<body>
<%
set rsCollection = server.Createobject("ADODB.Recordset")
SQL_StringCollection = "SELECT * from [collection] WHERE [item_menu]=" & request.querystring("id") & " ORDER BY [item_name] ASC"
rsCollection.open SQL_StringCollection , Conn
response.write "<table>"
Do until rsCollection.EOF %>
<tr>
<td>
<a href="java script:var win=window.open('description.asp?id=<%=rsCollection("id")%>','','height=500,width=600,location=0,menubar=0,status=0,toolbar=0')" onmouseover="showURL(this);showBox(411,420,event);" onmouseout="hideBox()"><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></a>
<div id="minDiv<%=rsCollection("id")" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div>
</td>
</tr>
<% rsCollection.movenext
loop %>
</table>
</body>
</html>
17. april 2005 - 00:22
#11
ahh to sek...der var fejl der
17. april 2005 - 00:24
#12
prøv følgende:
-------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd"> <html>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<script language="javascript" type="text/javascript">
function showBox(w,h,e,leftPos,topPos,id) {
box = document.getElementById(id).style;
box.left = ((e.clientX) ? e.clientX:e.pageX)+15+"px";
box.top = ((e.clientY) ? e.clientY:e.pageY)-15+"px";
box.width = w + 'px';
box.height = h + 'px';
box.display = "block";
}
function hideBox(id){
document.getElementById(id).style.display = 'none';
}
function showURL(link){
window.minIframe.location.href = link.href;
}
</script>
<body>
<%
set rsCollection = server.Createobject("ADODB.Recordset")
SQL_StringCollection = "SELECT * from [collection] WHERE [item_menu]=" & request.querystring("id") & " ORDER BY [item_name] ASC"
rsCollection.open SQL_StringCollection , Conn
response.write "<table>"
Do until rsCollection.EOF %>
<tr>
<td>
<a href="java script:var win=window.open('description.asp?id=<%=rsCollection("id")%>','','height=500,width=600,location=0,menubar=0,status=0,toolbar=0')" onmouseover="showURL(this);showBox(411,420,event,,,"minDiv<%=rsCollection("id")%>");" onmouseout="hideBox("minDiv<%=rsCollection("id")%>")"><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></a>
<div id="minDiv<%=rsCollection("id")%>" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div>
</td>
</tr>
<% rsCollection.movenext
loop %>
</table>
</body>
</html>
17. april 2005 - 00:25
#13
hvis den kokser må du evt gerne lægge et link så det kan ses på :o)
17. april 2005 - 00:28
#14
17. april 2005 - 00:29
#15
prøvede du den sidste kode jeg gav dig?
17. april 2005 - 00:35
#16
ok.. der døde den!
17. april 2005 - 00:36
#17
jeg har lige kikket på din side med "vis kilde" Alt javascript skal du sørge for er mellem <head> og </head> Du skal også sørge for at der kun er et <html>,</html>,<body> og </body> tag Måske includerer du siderne eller noget? Men der må ikke stå at html´en slutter midt i det hele. For så vil IE nok lave ged i den på et tidspunkt ... men det var bare et sidespring :o)
17. april 2005 - 00:37
#18
Sådan her ser den ud nu: <html> <head> <meta http-equiv="Content-Language" content="da"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Star Wars - Collector.dk</title> <style> a {text-decoration:none;} </style> <style fprolloverstyle>A:hover {font-size: 10 px; font-family: Arial; color: #C0C0C0} </style> </head> <script language="javascript" type="text/javascript"> function showBox(w,h,e,leftPos,topPos) { box = document.getElementById("minDiv").style; box.left = ((e.clientX) ? e.clientX:e.pageX)+15+"px"; box.top = ((e.clientY) ? e.clientY:e.pageY)-15+"px"; box.width = w + 'px'; box.height = h + 'px'; box.display = "block"; } function hideBox(){ document.getElementById("minDiv").style.display = 'none'; } function showURL(link){ window.minIframe.location.href = link.href; } </script> <body background="pix/bit1.jpg" style="background-attachment: fixed" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> <font face="Verdana"> <% MenuShow = request.querystring("id") Set Conn = Server.CreateObject("ADODB.Connection") DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../../cgi-data/starwars.mdb") Conn.Open DSN set rsOverskrift = server.Createobject("ADODB.Recordset") SQL_StringOverskrift = "SELECT * from [menu] WHERE [id]=" & request.querystring("id") rsOverskrift.open SQL_StringOverskrift , Conn set rsMenu = server.Createobject("ADODB.Recordset") SQL_StringMenu = "SELECT * from [menu] ORDER BY [id] ASC" rsMenu.open SQL_StringMenu, Conn %> </font> <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0" height="100%"> <tr> <td> <table border="0" width="100%" id="table2" cellspacing="0" cellpadding="0" height="100%"> <tr> <td height="150" colspan="3"> <font color="#FFFFFF" face="Verdana" size="2"> <img border="0" src="pix/Banner_001.jpg" width="750" height="150"></font></td> </tr> <tr> <td background="blue.PNG" height="10" width="20%"> </td> <td background="blue.PNG" height="10"> <p align="right"><font color="#FFFFFF" face="Verdana" size="2"> Star Wars Collector - Danmarks største Star Wars Database</font></td> <td background="pix/bit1.jpg" height="10" width="20%"> </td> </tr> <tr> <td bgcolor="#FFFFFF" colspan="3"> <table border="0" width="100%" id="table3" cellspacing="0" cellpadding="0" height="100%"> <tr> <td width="20%" background="red.PNG" valign="top"> <table border="0" width="100%" id="table4"> <tr> <td> <b> <font size="2" face="Verdana" color="#FFFFFF">Menu</font></b></td> <% Do until rsMenu.EOF response.write "<tr>" response.write "<td>" response.write "<a href=menu.asp?id=" & rsMenu("id") & ">" & "<font face='Verdana' size='2' color='#FFFFFF'>" & rsMenu("menu_name") & "</a>" response.write "</td>" response.write "</tr>" rsMenu.movenext loop %> </tr> </table> </td> <td valign="top"> <br> <font face="Arial" color="#000000"><b><% response.write rsOverskrift("menu_name")%></b><br><br> <table border="0" width="75%"> <tr> <td width="25"> </td> <td><font size="2" face="Verdana" color="#000000"><% response.write rsOverskrift("description")%></td> </tr> </table> <font face="Arial" size="2"> <br><br> <% set rsCollection = server.Createobject("ADODB.Recordset") SQL_StringCollection = "SELECT * from [collection] WHERE [item_menu]=" & request.querystring("id") & " ORDER BY [item_name] ASC" rsCollection.open SQL_StringCollection , Conn response.write "<table>" Do until rsCollection.EOF %> <tr> <td> <a href="java script:var win=window.open('description.asp?id=<%=rsCollection("id")%>','','height=500,width=600,location=0,menubar=0,status=0,toolbar=0')" onmouseover="showURL(this);showBox(411,420,event,,,"minDiv<%=rsCollection("id")%>");" onmouseout="hideBox("minDiv<%=rsCollection("id")%>")"><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></a> <div id="minDiv<%=rsCollection("id")%>" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div> </td> </tr> <% rsCollection.movenext loop %> </table> </td> </tr> </table> </td> <td width="20%" background="pix/bit1.jpg"> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </body> </html>
17. april 2005 - 00:43
#19
<html> <head> <meta http-equiv="Content-Language" content="da"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Star Wars - Collector.dk</title> <style> a {text-decoration:none;} </style> <style fprolloverstyle>A:hover {font-size: 10 px; font-family: Arial; color: #C0C0C0} </style> <script language="javascript" type="text/javascript"> function showBox(w,h,e,leftPos,topPos) { box = document.getElementById("minDiv").style; box.left = ((e.clientX) ? e.clientX:e.pageX)+15+"px"; box.top = ((e.clientY) ? e.clientY:e.pageY)-15+"px"; box.width = w + 'px'; box.height = h + 'px'; box.display = "block"; } function hideBox(){ document.getElementById("minDiv").style.display = 'none'; } function showURL(link){ window.minIframe.location.href = link.href; } </script> </head> <body background="pix/bit1.jpg" style="background-attachment: fixed" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> <font face="Verdana"> <% MenuShow = request.querystring("id") Set Conn = Server.CreateObject("ADODB.Connection") DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../../cgi-data/starwars.mdb") Conn.Open DSN set rsOverskrift = server.Createobject("ADODB.Recordset") SQL_StringOverskrift = "SELECT * from [menu] WHERE [id]=" & request.querystring("id") rsOverskrift.open SQL_StringOverskrift , Conn set rsMenu = server.Createobject("ADODB.Recordset") SQL_StringMenu = "SELECT * from [menu] ORDER BY [id] ASC" rsMenu.open SQL_StringMenu, Conn %> </font> <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0" height="100%"> <tr> <td> <table border="0" width="100%" id="table2" cellspacing="0" cellpadding="0" height="100%"> <tr> <td height="150" colspan="3"> <font color="#FFFFFF" face="Verdana" size="2"> <img border="0" src="pix/Banner_001.jpg" width="750" height="150"></font></td> </tr> <tr> <td background="blue.PNG" height="10" width="20%"> </td> <td background="blue.PNG" height="10"> <p align="right"><font color="#FFFFFF" face="Verdana" size="2"> Star Wars Collector - Danmarks største Star Wars Database</font></td> <td background="pix/bit1.jpg" height="10" width="20%"> </td> </tr> <tr> <td bgcolor="#FFFFFF" colspan="3"> <table border="0" width="100%" id="table3" cellspacing="0" cellpadding="0" height="100%"> <tr> <td width="20%" background="red.PNG" valign="top"> <table border="0" width="100%" id="table4"> <tr> <td> <b> <font size="2" face="Verdana" color="#FFFFFF">Menu</font></b></td> <% Do until rsMenu.EOF response.write "<tr>" response.write "<td>" response.write "<a href=menu.asp?id=" & rsMenu("id") & ">" & "<font face='Verdana' size='2' color='#FFFFFF'>" & rsMenu("menu_name") & "</a>" response.write "</td>" response.write "</tr>" rsMenu.movenext loop %> </tr> </table> </td> <td valign="top"> <br> <font face="Arial" color="#000000"><b><% response.write rsOverskrift("menu_name")%></b><br><br> <table border="0" width="75%"> <tr> <td width="25"> </td> <td><font size="2" face="Verdana" color="#000000"><% response.write rsOverskrift("description")%></td> </tr> </table> <font face="Arial" size="2"> <br><br> <% set rsCollection = server.Createobject("ADODB.Recordset") SQL_StringCollection = "SELECT * from [collection] WHERE [item_menu]=" & request.querystring("id") & " ORDER BY [item_name] ASC" rsCollection.open SQL_StringCollection , Conn response.write "<table>" Do until rsCollection.EOF %> <tr> <td> <a href="java script:var win=window.open('description.asp?id=<%=rsCollection("id")%>','','height=500,width=600,location=0,menubar=0,status=0,toolbar=0')" onmouseover="showURL(this);showBox(411,420,event,,,"minDiv<%=rsCollection("id")%>");" onmouseout="hideBox("minDiv<%=rsCollection("id")%>")"><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></a> <div id="minDiv<%=rsCollection("id")%>" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div> </td> </tr> <% rsCollection.movenext loop %> </table> </td> </tr> </table> </td> <td width="20%" background="pix/bit1.jpg"> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </body> </html>
17. april 2005 - 00:45
#20
prøv lige Men det ligner jo nærmest ellers at den ikke får noget ud af databasen
17. april 2005 - 00:46
#21
17. april 2005 - 00:51
#22
prøv rette det esientielle til det her: ----- <a href="#" onmouseover="showURL(this);showBox(411,420,event,,,"minDiv<%=rsCollection("id")%>");" onmouseout="hideBox("minDiv<%=rsCollection("id")%>")"><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></font></a> <div id="minDiv<%=rsCollection("id")%>" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div> ------ Så kigger jeg på siden når det er rettet
17. april 2005 - 00:56
#23
hov - javascriptet var røget i svinget på en og anden måde...skulle være rettet til <script language="javascript" type="text/javascript"> function showBox(w,h,e,leftPos,topPos,id) { box = document.getElementById(id).style; box.left = ((e.clientX) ? e.clientX:e.pageX)+15+"px"; box.top = ((e.clientY) ? e.clientY:e.pageY)-15+"px"; box.width = w + 'px'; box.height = h + 'px'; box.display = "block"; } function hideBox(id){ document.getElementById(id).style.display = 'none'; } function showURL(link){ window.minIframe.location.href = link.href; } </script>
17. april 2005 - 00:59
#24
17. april 2005 - 01:00
#25
ok så skal den her rettes igen... håber du har tålmodighed? :o)... ----- <a href="#" onmouseover="showURL(this);showBox(411,420,event,,,'minDiv<%=rsCollection("id")%>');" onmouseout="hideBox('minDiv<%=rsCollection("id")%>')"><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></font></a> <div id="minDiv<%=rsCollection("id")%>" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div> ------
17. april 2005 - 01:01
#26
<html> <head> <meta http-equiv="Content-Language" content="da"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Star Wars - Collector.dk</title> <style> a {text-decoration:none;} </style> <style fprolloverstyle>A:hover {font-size: 10 px; font-family: Arial; color: #C0C0C0} </style> <script language="javascript" type="text/javascript"> function showBox(w,h,e,leftPos,topPos,id) { box = document.getElementById(id).style; box.left = ((e.clientX) ? e.clientX:e.pageX)+15+"px"; box.top = ((e.clientY) ? e.clientY:e.pageY)-15+"px"; box.width = w + 'px'; box.height = h + 'px'; box.display = "block"; } function hideBox(id){ document.getElementById(id).style.display = 'none'; } function showURL(link){ window.minIframe.location.href = link.href; } </script> </head> <body background="pix/bit1.jpg" style="background-attachment: fixed" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> <font face="Verdana"> <% MenuShow = request.querystring("id") Set Conn = Server.CreateObject("ADODB.Connection") DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../../cgi-data/starwars.mdb") Conn.Open DSN set rsOverskrift = server.Createobject("ADODB.Recordset") SQL_StringOverskrift = "SELECT * from [menu] WHERE [id]=" & request.querystring("id") rsOverskrift.open SQL_StringOverskrift , Conn set rsMenu = server.Createobject("ADODB.Recordset") SQL_StringMenu = "SELECT * from [menu] ORDER BY [id] ASC" rsMenu.open SQL_StringMenu, Conn %> </font> <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0" height="100%"> <tr> <td> <table border="0" width="100%" id="table2" cellspacing="0" cellpadding="0" height="100%"> <tr> <td height="150" colspan="3"> <font color="#FFFFFF" face="Verdana" size="2"> <img border="0" src="pix/Banner_001.jpg" width="750" height="150"></font></td> </tr> <tr> <td background="blue.PNG" height="10" width="20%"> </td> <td background="blue.PNG" height="10"> <p align="right"><font color="#FFFFFF" face="Verdana" size="2"> Star Wars Collector - Danmarks største Star Wars Database</font></td> <td background="pix/bit1.jpg" height="10" width="20%"> </td> </tr> <tr> <td bgcolor="#FFFFFF" colspan="3"> <table border="0" width="100%" id="table3" cellspacing="0" cellpadding="0" height="100%"> <tr> <td width="20%" background="red.PNG" valign="top"> <table border="0" width="100%" id="table4"> <tr> <td> <b> <font size="2" face="Verdana" color="#FFFFFF">Menu</font></b></td> <% Do until rsMenu.EOF response.write "<tr>" response.write "<td>" response.write "<a href=menu.asp?id=" & rsMenu("id") & ">" & "<font face='Verdana' size='2' color='#FFFFFF'>" & rsMenu("menu_name") & "</a>" response.write "</td>" response.write "</tr>" rsMenu.movenext loop %> </tr> </table> </td> <td valign="top"> <br> <font face="Arial" color="#000000"><b><% response.write rsOverskrift("menu_name")%></b><br><br> <table border="0" width="75%"> <tr> <td width="25"> </td> <td><font size="2" face="Verdana" color="#000000"><% response.write rsOverskrift("description")%></td> </tr> </table> <font face="Arial" size="2"> <br><br> <% set rsCollection = server.Createobject("ADODB.Recordset") SQL_StringCollection = "SELECT * from [collection] WHERE [item_menu]=" & request.querystring("id") & " ORDER BY [item_name] ASC" rsCollection.open SQL_StringCollection , Conn response.write "<table>" Do until rsCollection.EOF %> <tr> <td> <a href="#" onmouseover="showURL(this);showBox(411,420,event,,,"minDiv<%=rsCollection("id")%>");" onmouseout="hideBox("minDiv<%=rsCollection("id")%>")"><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></font></a> <div id="minDiv<%=rsCollection("id")%>" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div> </td> </tr> <% rsCollection.movenext loop %> </table> </td> </tr> </table> </td> <td width="20%" background="pix/bit1.jpg"> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </body> </html>
17. april 2005 - 01:02
#27
då kom der en masse kode.. mon du så så rettelsen lige før dit sidste indlæg? :o)
17. april 2005 - 01:03
#28
Det går da helt galt nu... nu kan jeg ikke åbne i et nyt vindue! *LOL*
17. april 2005 - 01:04
#29
Ja har masser af tålmodighed
17. april 2005 - 01:10
#30
<html> <head> <meta http-equiv="Content-Language" content="da"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Star Wars - Collector.dk</title> <style> a {text-decoration:none;} </style> <style fprolloverstyle>A:hover {font-size: 10 px; font-family: Arial; color: #C0C0C0} </style> <script language="javascript" type="text/javascript"> function showBox(w,h,e,leftPos,topPos,id) { box = document.getElementById(id).style; box.left = ((e.clientX) ? e.clientX:e.pageX)+15+"px"; box.top = ((e.clientY) ? e.clientY:e.pageY)-15+"px"; box.width = w + 'px'; box.height = h + 'px'; box.display = "block"; } function hideBox(id){ document.getElementById(id).style.display = 'none'; } function showURL(link){ window.minIframe.location.href = link.href; } </script> </head> <body background="pix/bit1.jpg" style="background-attachment: fixed" link="#FFFFFF" vlink="#FFFFFF" alink="#FFFFFF" topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0"> <font face="Verdana"> <% MenuShow = request.querystring("id") Set Conn = Server.CreateObject("ADODB.Connection") DSN = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../../cgi-data/starwars.mdb") Conn.Open DSN set rsOverskrift = server.Createobject("ADODB.Recordset") SQL_StringOverskrift = "SELECT * from [menu] WHERE [id]=" & request.querystring("id") rsOverskrift.open SQL_StringOverskrift , Conn set rsMenu = server.Createobject("ADODB.Recordset") SQL_StringMenu = "SELECT * from [menu] ORDER BY [id] ASC" rsMenu.open SQL_StringMenu, Conn %> </font> <table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0" height="100%"> <tr> <td> <table border="0" width="100%" id="table2" cellspacing="0" cellpadding="0" height="100%"> <tr> <td height="150" colspan="3"> <font color="#FFFFFF" face="Verdana" size="2"> <img border="0" src="pix/Banner_001.jpg" width="750" height="150"></font></td> </tr> <tr> <td background="blue.PNG" height="10" width="20%"> </td> <td background="blue.PNG" height="10"> <p align="right"><font color="#FFFFFF" face="Verdana" size="2"> Star Wars Collector - Danmarks største Star Wars Database</font></td> <td background="pix/bit1.jpg" height="10" width="20%"> </td> </tr> <tr> <td bgcolor="#FFFFFF" colspan="3"> <table border="0" width="100%" id="table3" cellspacing="0" cellpadding="0" height="100%"> <tr> <td width="20%" background="red.PNG" valign="top"> <table border="0" width="100%" id="table4"> <tr> <td> <b> <font size="2" face="Verdana" color="#FFFFFF">Menu</font></b></td> <% Do until rsMenu.EOF response.write "<tr>" response.write "<td>" response.write "<a href=menu.asp?id=" & rsMenu("id") & ">" & "<font face='Verdana' size='2' color='#FFFFFF'>" & rsMenu("menu_name") & "</a>" response.write "</td>" response.write "</tr>" rsMenu.movenext loop %> </tr> </table> </td> <td valign="top"> <br> <font face="Arial" color="#000000"><b><% response.write rsOverskrift("menu_name")%></b><br><br> <table border="0" width="75%"> <tr> <td width="25"> </td> <td><font size="2" face="Verdana" color="#000000"><% response.write rsOverskrift("description")%></td> </tr> </table> <font face="Arial" size="2"> <br><br> <% set rsCollection = server.Createobject("ADODB.Recordset") SQL_StringCollection = "SELECT * from [collection] WHERE [item_menu]=" & request.querystring("id") & " ORDER BY [item_name] ASC" rsCollection.open SQL_StringCollection , Conn response.write "<table>" Do until rsCollection.EOF %> <tr> <td> <a href="#" onmouseover="showURL(this);showBox(411,420,event,,,'minDiv<%=rsCollection("id")%>');" onmouseout="hideBox('minDiv<%=rsCollection("id")%>')"><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></font></a> <div id="minDiv<%=rsCollection("id")%>" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div> </td> </tr> <% rsCollection.movenext loop %> </table> </td> </tr> </table> </td> <td width="20%" background="pix/bit1.jpg"> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </body> </html>
17. april 2005 - 01:11
#31
ok det med at du ikke kan klikke på den er fordi det fjernede jeg midlertidig fordi den skrev der var en syntaks fejl. Derfor tænkte jeg at den funktionalitet nok var til at sætte ind igen når Boxen virker :o) Problemet er at den stadig siger at der er syntaksfejl og den er svær at lure synes jeg prøv lige denne her bare for at være nede på jorden ----- <a href="#" onmouseover="showBox(411,420,event,,,'minDiv<%=rsCollection("id")%>');" onmouseout="hideBox('minDiv<%=rsCollection("id")%>')"><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></font></a> <div id="minDiv<%=rsCollection("id")%>" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div> ------
17. april 2005 - 01:15
#32
virker ikke
17. april 2005 - 01:20
#33
den siger der er syntaks fejl i linje 74 tegn 23 ..det svarer til 'e' og 'r' i ordet onmouseover.. så det er jo helt hen i vejret... kan jeg ærligt ikke helt forstå
17. april 2005 - 01:25
#34
ok hvis vi undlader at kalde funktionen og den så stadig giver syntaks fejl..så giver jeg næsten op ----- <a href="#"><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></font></a> <div id="minDiv<%=rsCollection("id")%>" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div> ------
17. april 2005 - 01:29
#35
godt så... så melder den da ingen fejl så prøv: ----- <a href="#" onmouseover="showBox(411,420,event,,,'minDiv<%=rsCollection("id")%>')"><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></font></a> <div id="minDiv<%=rsCollection("id")%>" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div> ------
17. april 2005 - 01:29
#36
Dur ikke... nu vil den heller ikke åbnet et vindue!
17. april 2005 - 01:30
#37
ved godt det ikke dur. Det er for at finde fejlen så at sige :o)
17. april 2005 - 01:31
#38
ok! Så blander jeg mig uden om! *GG*
17. april 2005 - 01:34
#39
strange...synes jeg --- <a href="#" onmouseover="showBox(411,420,event,200,200,'minDiv<%=rsCollection("id")%>')"><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></font></a> <div id="minDiv<%=rsCollection("id")%>" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div> ------
17. april 2005 - 01:36
#40
Ok... nu kom der da et eller andet frem!
17. april 2005 - 01:37
#41
yes godt så tager vi den næste del med at fjerne den --- <a href="#" onmouseover="showBox(411,420,event,200,200,'minDiv<%=rsCollection("id")%>') onmouseout="hideBox('minDiv<%=rsCollection("id")%>')""><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></font></a> <div id="minDiv<%=rsCollection("id")%>" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div> ------
17. april 2005 - 01:39
#42
Tilbage hvor vi startede..... ingen vinude!
17. april 2005 - 01:40
#43
copy paste fejl --- <a href="#" onmouseover="showBox(411,420,event,200,200,'minDiv<%=rsCollection("id")%>')" onmouseout="hideBox('minDiv<%=rsCollection("id")%>')"><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></font></a> <div id="minDiv<%=rsCollection("id")%>" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div> ------
17. april 2005 - 01:42
#44
Ok... fedest!!!! Men jeg kan jo ikke klikke!
17. april 2005 - 01:43
#45
passer det at der ikke er billeder endnu på dem alle?
17. april 2005 - 01:43
#46
Ja... de er slet ikke uploadet endnu!
17. april 2005 - 01:44
#47
--- <a href="java script:var win=window.open('description.asp?id=<%=rsCollection("id")%>','','height=500,width=600,location=0,menubar=0,status=0,toolbar=0')" onmouseover="showBox(411,420,event,200,200,'minDiv<%=rsCollection("id")%>')" onmouseout="hideBox('minDiv<%=rsCollection("id")%>')"><font face='Verdana' size='2' color='#000000'><%=rsCollection("item_name")%></font></a> <div id="minDiv<%=rsCollection("id")%>" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div> ------
17. april 2005 - 01:44
#48
det burde give dig et vindue når du klikker
17. april 2005 - 01:45
#49
størrelse og placering af vinduet kan du altid rette i funktionen showbox Det må være til at "lege" lidt med til det passer :o)
17. april 2005 - 01:47
#50
Nu er der gået ged i den!
17. april 2005 - 01:49
#51
du er kommet til at slette for mange linjer ned til der hvor der stod "loop" Prøv sammenlign med koden højere oppe
17. april 2005 - 01:51
#52
Jeg kan se at det er mit description vindue jeg åbner når jeg kører hen over.... kan man ikke lave om på det, så det hedder noget andet?? Evt mini.asp
17. april 2005 - 01:55
#53
jo i denne her ... <div id="minDiv<%=rsCollection("id")%>" style="position:absolute;border:2px ridge #222;display:none;overflow:hidden;"><iframe id="minIframe" name="minIframe" src="description.asp?id=<%=rsCollection("id")%>" style="width:100%;height:100%;overflow:hidden;"></iframe></div> ... kan du rette denne her, src="description.asp?id=<%=rsCollection("id")%> til, src="mappe/billede.jpg" altså til billedet direkte
17. april 2005 - 01:58
#54
Det er sådan jeg gerne vil!
17. april 2005 - 02:01
#55
Hmmm underligt: src="/collection/?id=<%=rsCollection("id") & ".jpg"%>
17. april 2005 - 02:02
#56
ok... der var jeg bare dum!
17. april 2005 - 02:03
#57
Kan man få den til at gøre billedet 50%??
17. april 2005 - 02:08
#58
den sætter da id på...du skal blot sikre at mappen er angivet korrekt i forhold til den mappe som koden er i så billedet kun vises i halv størrelse? Så ville det nemmeste nok at gøre som før da du kaldte description Lav en side som hedder fx min.asp På den side laver du følgende <img src=<%=request.querystring("sti")%> width="50%" height="50%"> Ret dernæst src="/collection/?id=<%=rsCollection("id") & ".jpg"%> til src="minside.asp?sti=/collection/<%=rsCollection("id")%>.jpg"
17. april 2005 - 02:10
#59
Jeg tror altså jeg vil til at hoppe i seng Håber du kan se ideen ud fra det jeg skrev? Hvis der dukker noget op så er jeg på igen i morgen hvis det er :o) Men synes da det lykkedes rimeligt trods alt
17. april 2005 - 02:13
#60
ok! Så kører det!
17. april 2005 - 02:14
#61
lækkert :o)
17. april 2005 - 02:14
#62
Jeg siger 1000000 tak!
Kurser inden for grundlæggende programmering