Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #7149 > unrolled thread

Multiple <a> Tags, Filled With MySQL DB data with PHP

Started bytom.rankin51@googlemail.com
First post2012-09-25 10:43 -0700
Last post2012-09-26 13:35 -0700
Articles 5 on this page of 25 — 6 participants

Back to article view | Back to comp.lang.php


Contents

  Multiple <a> Tags, Filled With MySQL DB data with PHP tom.rankin51@googlemail.com - 2012-09-25 10:43 -0700
    Re: Multiple <a> Tags, Filled With MySQL DB data with PHP Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-25 14:21 -0400
      Re: Multiple <a> Tags, Filled With MySQL DB data with PHP tom.rankin51@googlemail.com - 2012-09-25 11:26 -0700
        Re: Multiple <a> Tags, Filled With MySQL DB data with PHP Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-25 16:02 -0400
    Re: Multiple <a> Tags, Filled With MySQL DB data with PHP Denis McMahon <denismfmcmahon@gmail.com> - 2012-09-25 18:41 +0000
      Re: Multiple <a> Tags, Filled With MySQL DB data with PHP tom.rankin51@googlemail.com - 2012-09-25 12:16 -0700
      Re: Multiple <a> Tags, Filled With MySQL DB data with PHP tom.rankin51@googlemail.com - 2012-09-25 12:58 -0700
        Re: Multiple <a> Tags, Filled With MySQL DB data with PHP Luuk <luuk@invalid.lan> - 2012-09-25 22:12 +0200
          Re: Multiple <a> Tags, Filled With MySQL DB data with PHP tom.rankin51@googlemail.com - 2012-09-25 13:38 -0700
            Re: Multiple <a> Tags, Filled With MySQL DB data with PHP tom.rankin51@googlemail.com - 2012-09-25 13:53 -0700
          Re: Multiple <a> Tags, Filled With MySQL DB data with PHP Denis McMahon <denismfmcmahon@gmail.com> - 2012-09-25 23:19 +0000
            Re: Multiple <a> Tags, Filled With MySQL DB data with PHP Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-25 19:48 -0400
              Re: Multiple <a> Tags, Filled With MySQL DB data with PHP Denis McMahon <denismfmcmahon@gmail.com> - 2012-09-26 14:25 +0000
    Re: Multiple <a> Tags, Filled With MySQL DB data with PHP tom.rankin51@googlemail.com - 2012-09-25 12:10 -0700
    Re: Multiple <a> Tags, Filled With MySQL DB data with PHP Christoph Becker <cmbecker69@gmx.de> - 2012-09-26 00:27 +0200
      Re: Multiple <a> Tags, Filled With MySQL DB data with PHP Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-25 19:18 -0400
        Re: Multiple <a> Tags, Filled With MySQL DB data with PHP Christoph Becker <cmbecker69@gmx.de> - 2012-09-26 02:04 +0200
          Re: Multiple <a> Tags, Filled With MySQL DB data with PHP Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-25 21:45 -0400
            Re: Multiple <a> Tags, Filled With MySQL DB data with PHP tom.rankin51@googlemail.com - 2012-09-25 23:16 -0700
              Re: Multiple <a> Tags, Filled With MySQL DB data with PHP tom.rankin51@googlemail.com - 2012-09-26 01:39 -0700
                Re: Multiple <a> Tags, Filled With MySQL DB data with PHP Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-26 07:48 -0400
                Re: Multiple <a> Tags, Filled With MySQL DB data with PHP Christoph Becker <cmbecker69@gmx.de> - 2012-09-26 14:12 +0200
              Re: Multiple <a> Tags, Filled With MySQL DB data with PHP Jerry Stuckle <jstucklex@attglobal.net> - 2012-09-26 06:53 -0400
            Re: Multiple <a> Tags, Filled With MySQL DB data with PHP Captain Paralytic <paul_lautman@yahoo.com> - 2012-09-26 05:16 -0700
    Re: Multiple <a> Tags, Filled With MySQL DB data with PHP tom.rankin51@googlemail.com - 2012-09-26 13:35 -0700

Page 2 of 2 — ← Prev page 1 [2]


#7183

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-09-26 07:48 -0400
Message-ID<k3uq2d$ber$1@dont-email.me>
In reply to#7181
On 9/26/2012 4:39 AM, tom.rankin51@googlemail.com wrote:
> To help things along, please find a test page at www.tomrankinmusic.com/vistest.php
>

OK, so you're loading the same image 4 times in the first row, not 4 
different images.  Additionally, there is no facebook link in your code.

Looks to me the browser is doing exactly what the xhtml indicates.


-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#7185

FromChristoph Becker <cmbecker69@gmx.de>
Date2012-09-26 14:12 +0200
Message-ID<k3urec$e6h$1@speranza.aioe.org>
In reply to#7181
tom.rankin51 wrote:
> To help things along, please find a test page at www.tomrankinmusic.com/vistest.php

The link is quite helpful.  The second row works as expected according
to the generated XHTML (which BTW isn't valid; you should better fix
that, as it might cause problems with javascript).  But the second
thumbnail is missing, what *might* be related to an error in your PHP code.

The first row seems to be a Fancybox related problem.  So you might
better ask in an appropriate support forum/newsgroup.  If I had to
*guess* what's causing the problem, I would say it's the numeric rel
attribute.  You might try something like rel="gallery2" instead.

-- 
Christoph M. Becker

[toc] | [prev] | [next] | [standalone]


#7182

FromJerry Stuckle <jstucklex@attglobal.net>
Date2012-09-26 06:53 -0400
Message-ID<k3ums8$omn$1@dont-email.me>
In reply to#7179
On 9/26/2012 2:16 AM, tom.rankin51@googlemail.com wrote:
> So should I attempt debugging this? People seem tonhbe mixed opinions over whether it would be a wise thing to do?
>

It's up to you.  Do you want it to work?

> There also seems to be debate over whether my HTML is the same in both cases. I can post this too ifnit helps?
>

This is a PHP newsgroup, not an HTML newsgroup.  You should be able to 
compare your HTML with what works.

If it were the same in both cases, it would work the same in both cases. 
  It could be something as simple as a missing quote, unbalanced less 
than/greater than signs, etc.

> I can post my JS but it is anything standard at fancyapps.com/fancybox
>

See above.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#7186

FromCaptain Paralytic <paul_lautman@yahoo.com>
Date2012-09-26 05:16 -0700
Message-ID<2e7ebc8b-508e-41fd-8894-5197aa64e0a9@k6g2000vbr.googlegroups.com>
In reply to#7178
On Sep 26, 2:45 am, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> On 9/25/2012 8:04 PM, Christoph Becker wrote:
>
> > Jerry Stuckle wrote:
> >> What javascript is being used here?
>
> > Tom wants to present the images with Fancybox <http://fancybox.net/>
> > (see the OP).  Since the generated (X)HTML is /reportedly/ the same as
> > the hand-written one, there /might/ be a problem on the javascript side
> > -- even if that's quite unlikely, if the generated code is /exactly/ the
> > same.
>
> The HTML he's trying to emulate does not use javascript.
>
> And even if it did - it would be the same javascript in both cases, and
> would either work or fail in both cases.

The HTML he is trying to emulate is "input" to the fancybox
javascript. The class and rel attributes are picked up by the fancybox
javascript.

However, as you say, if the HTML code produced by the php was (as the
OP has said) EXACTLY the same as the hand written stuff then, since
the browser knows nothing about anything apart from the HTML, CSS &
Javascript, it would either work in both the "hand crafted" and the
"php generated" cases or it would not work in both.

Since the OP "says" that the HTML source is exactly the same in both
cases, yet it works with the hand crafted one but not in the php
generated one, we have to assume that he is either lying, or he has
not examined the two sets of HTML code accurately.

[toc] | [prev] | [next] | [standalone]


#7190

Fromtom.rankin51@googlemail.com
Date2012-09-26 13:35 -0700
Message-ID<be879fdd-9e58-4345-8b4e-629585c27b4a@googlegroups.com>
In reply to#7149
After a bit of fiddling, it appears as though something doesn't like a) thumbnails loading for every image as per the code I had written, b) other code referencing the same images at once, c) even code nested in comment tags which I can't understand but it did seem to make a difference.

A fancybox gallery is so due to the contents of the "rel" tag, and then is displayed on the page by one initial <img> tag (obviously within the first <a> tag) for every instance of "rel".

Anyway, seeing as I have figured that bit out, I'm thinking I now need a bit of php to figure out how to load a thumbnail for the last added image only while keeping the <img> tags out of the loop for everything else.  The kicker is that I would need the last added image for every different "rel" designation which will obviously be different.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.php


csiph-web