Note that there are some explanatory texts on larger screens.

plurals
  1. POalbum photos not displaying in Colorbox using jQuery
    primarykey
    data
    text
    <p>I am new to programming especially jQuery.</p> <p>I am trying to use ColorBox to display photos from an album using the example from <a href="http://www.xdevsoftware.com/blog/post/Using-ColorBox-in-ASPNET.aspx" rel="nofollow">http://www.xdevsoftware.com/blog/post/Using-ColorBox-in-ASPNET.aspx</a> The details of the photo are stored and retrived from a DB.</p> <p>Everything works fine like the photos for the selected album display in the DataList, the problem is that when I click on a photo, instead of using coloBox to display the photo, it opens the actual photo e.g. localhost:3478/FPOS_v2/uploads/08012011080.JPG</p> <p>Below is the .aspx code:</p> <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server"&gt; &lt;title&gt;&lt;/title&gt; &lt;link href="ColorBox/colorbox.css" rel="stylesheet" type="text/css" /&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript" /&gt; &lt;script src="ColorBox/jquery.colorbox.js" type="text/javascript" /&gt; &lt;script type="text/javascript"&gt; $(document).ready(function () { $("a[rel='example1']").colorbox(); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form id="form1" runat="server"&gt; &lt;div&gt; &lt;asp:DataList runat="server" ID="dlColorBox" RepeatColumns="3" RepeatDirection="Horizontal"&gt; &lt;ItemTemplate&gt; &lt;asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='&lt;%# "~/uploads/"+Eval("OriginalFilePath") %&gt;' rel="example1" Title='&lt;%# Eval("FileName") %&gt;'&gt; &lt;asp:Image ID="Image1" runat="server" ImageUrl='&lt;%# "~/uploads/"+Eval("ThumbFilePath") %&gt;' Width="100" Height="100" BorderStyle="None" /&gt; &lt;/asp:HyperLink&gt; &lt;/ItemTemplate&gt; &lt;/asp:DataList&gt; &lt;/div&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Below is the vb.net code:</p> <pre><code> Imports SqlHelper Imports System.Data Partial Class colorBoxDisplay Inherits System.Web.UI.Page Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init DAL.connectionstring = ConfigurationManager.ConnectionStrings("fpaConnectionString").ConnectionString End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load BuildDataSet() End Sub Private Sub BuildDataSet() Dim dataset As DataSet dataset = SqlHelper.ExecuteDataset(DAL.connectionstring, "fpa_SP_album_view_by_id_gridview", 34) dlColorBox.DataSource = dataset dlColorBox.DataBind() End Sub </code></pre> <p>Could someone please tell how to correct this? or to be able to display the photos within dlColorBox DataList using ColorBox?</p> <p>So it is displays the photos within the selected album like Grouped Photo 1 example colorpowered.com/colorbox/core/example1/index.html</p> <p>I am new to jQuery so could you please indicate how to make this work by changing the code as I have spent last 3 days looking at different examples on the internet.</p> <p>Any help would be much appreciated :)</p> <p>Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload