Fish Eye Menu Support Product Page
This topic was archived
Dynamic Images...
Shared 17 years ago
1
likes this idea
17 years ago Bobby Edgar posted:
It would be cool if you could make the images come from a DB of a recordset. Replies
Replied 17 years ago
17 years ago dominique dval replied:
I think it too.
Replied 17 years ago
17 years ago Georgi Kralev replied:
Hi All,
Fish Eye Menu code could be easily modified to display the images from Database recordset.
And this could be accomplished with already available Sever Behaviors in Dreamweaver.
Therefore, at this point I do not believe that this feature is quite necessary.
Check the following sample code:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/cnnTest_DB.asp" -->
<%
var rsImages__MMColParam = "1";
if (String(Request.QueryString("id"
) != "undefined" &&
String(Request.QueryString("id"
) != ""
{
rsImages__MMColParam = String(Request.QueryString("id"
);
}
%>
<%
var rsImages_cmd = Server.CreateObject ("ADODB.Command"
;
rsImages_cmd.ActiveConnection = MM_cnnTest_DB_STRING;
rsImages_cmd.CommandText = "SELECT * FROM dbo.Images WHERE id > ?";
rsImages_cmd.Prepared = true;
rsImages_cmd.Parameters.Append(rsImages_cmd.CreateParameter("param1", 5, 1, -1, rsImages__MMColParam)); // adDouble
var rsImages = rsImages_cmd.Execute();
var rsImages_numRows = 0;
%>
<%
var Repeat1__numRows = 5;
var Repeat1__index = 0;
rsImages_numRows += Repeat1__numRows;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>sample_FEM</title>
<script src="ScriptLibrary/jquery-latest.pack.js" type="text/javascript"></script>
<script src="ScriptLibrary/jquery.dimensions.pack.js" type="text/javascript"></script>
<script src="ScriptLibrary/DMXFishEye-min.js" type="text/javascript"></script>
<link href="styles/fisheye.css" rel="stylesheet" type="text/css" />
</head>
<body>
<% var LeftPosCounter = 0; %>
<div id="fishEye1" class="fisheye">
<div style="left: 440px" class="fisheyeContainter">
<% while ((Repeat1__numRows-- != 0) && (!rsImages.EOF)) { %>
<a style="width: 40px; left: <%=LeftPosCounter%>px;" href="" class="fisheyeItem"><img src="Images/<%=(rsImages.Fields.Item("imgName"
.Value)%>" width="40" /><span></span></a>
<%
LeftPosCounter += 40;
Repeat1__index++;
rsImages.MoveNext();
}
%>
</div>
</div>
<script type="text/javascript">
// <![CDATA[
$(document).ready(
function()
{
$("#fishEye1"
.dmxFishEye(
{
itemWidth: 40,
maxWidth: 30,
smoothness: 'high',
items: 'a',
textItems: 'span',
container: '.fisheyeContainter'
}
);
}
);
// ]]>
</script>
</body>
</html>
<%
rsImages.Close();
%> <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Regards,
Georgi Kralev
----------------------------------
Support - www.DMXzone.com
Fish Eye Menu code could be easily modified to display the images from Database recordset.
And this could be accomplished with already available Sever Behaviors in Dreamweaver.
Therefore, at this point I do not believe that this feature is quite necessary.
Check the following sample code:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/cnnTest_DB.asp" -->
<%
var rsImages__MMColParam = "1";
if (String(Request.QueryString("id"

String(Request.QueryString("id"


rsImages__MMColParam = String(Request.QueryString("id"

}
%>
<%
var rsImages_cmd = Server.CreateObject ("ADODB.Command"

rsImages_cmd.ActiveConnection = MM_cnnTest_DB_STRING;
rsImages_cmd.CommandText = "SELECT * FROM dbo.Images WHERE id > ?";
rsImages_cmd.Prepared = true;
rsImages_cmd.Parameters.Append(rsImages_cmd.CreateParameter("param1", 5, 1, -1, rsImages__MMColParam)); // adDouble
var rsImages = rsImages_cmd.Execute();
var rsImages_numRows = 0;
%>
<%
var Repeat1__numRows = 5;
var Repeat1__index = 0;
rsImages_numRows += Repeat1__numRows;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>sample_FEM</title>
<script src="ScriptLibrary/jquery-latest.pack.js" type="text/javascript"></script>
<script src="ScriptLibrary/jquery.dimensions.pack.js" type="text/javascript"></script>
<script src="ScriptLibrary/DMXFishEye-min.js" type="text/javascript"></script>
<link href="styles/fisheye.css" rel="stylesheet" type="text/css" />
</head>
<body>
<% var LeftPosCounter = 0; %>
<div id="fishEye1" class="fisheye">
<div style="left: 440px" class="fisheyeContainter">
<% while ((Repeat1__numRows-- != 0) && (!rsImages.EOF)) { %>
<a style="width: 40px; left: <%=LeftPosCounter%>px;" href="" class="fisheyeItem"><img src="Images/<%=(rsImages.Fields.Item("imgName"

<%
LeftPosCounter += 40;
Repeat1__index++;
rsImages.MoveNext();
}
%>
</div>
</div>
<script type="text/javascript">
// <
{
itemWidth: 40,
maxWidth: 30,
smoothness: 'high',
items: 'a',
textItems: 'span',
container: '.fisheyeContainter'
}
);
}
);
// ]]>
</script>
</body>
</html>
<%
rsImages.Close();
%> <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Regards,
Georgi Kralev
----------------------------------
Support - www.DMXzone.com