|
The anchor doesn't work on page when using script
|
|
03-24-2011, 04:37 PM
Post: #1
|
|||
|
|||
|
The anchor doesn't work on page when using script
# KoschtIT Image Gallery 2.5 realeased on 10/31/2010
# PHP 5.x # Did your site passed the W3C validator check? Only page with image gallery # No error/warning message shown. # http://www.aluzia.net/photo.php There are 3 galleries each with its own anchor: <!-- 1st --> <a name="photo_bombonica_video"></a> .... <div class="koschtitgallery .... ></div> .... <!-- 2nd --> <a name="photo_bombonica_recording"></a> .... <div class="koschtitgallery .... ></div> ..... <!-- 3rd--> <a name="photo_2006_2007"></a> .... <div class="koschtitgallery .... ></div> ..... When the page is loading with anchor as parameter for example: http://www.aluzia.net/photo.php#photo_2006_2007 the anchor doesn't work in none of browsers (FireFox 3.6, IE8, Chrome 10) In Opera 11 it works sometimes... |
|||
|
03-24-2011, 06:07 PM
Post: #2
|
|||
|
|||
|
RE: The anchor doesn't work on page when using script
You have a wrong syntax. Look at my site how I implemented named anchors:
<a id="hoto_2006_2007">Something</a> The important thing is that an anchor can't be empty. Put something inside it. You can read http://stackoverflow.com/questions/48471...name-or-id for more details. Code: You shouldn’t use <h1><a name="foo"/>Foo Title</h1> in any flavor of HTML served as text/html, because the XML empty element syntax isn’t supported in text/html. However, <h1><a name="foo">Foo Title</a></h1> is OK in HTML4. It is not valid in HTML5 as currently drafted.KoschtIT Image Gallery developer |
|||
|
03-24-2011, 07:24 PM
Post: #3
|
|||
|
|||
|
RE: The anchor doesn't work on page when using script
I tried with:
<a id="photo_2006_2007">Text</a> <a id="photo_2006_2007"><p>Text</p></a> - for my design <p><a id="photo_2006_2007">Text</a></p> - your example <p id="photo_2006_2007">Text</p> the problem still remains... |
|||
|
03-24-2011, 07:29 PM
Post: #4
|
|||
|
|||
|
RE: The anchor doesn't work on page when using script
You cant have a <p> inside an anchor-element. That is just not valid. Make sure your page is valid XHTML and then everything will fork fine. Check: http://validator.w3.org/check?uri=http%3...ator%2F1.2
KoschtIT Image Gallery developer |
|||
|
03-24-2011, 07:39 PM
Post: #5
|
|||
|
|||
|
RE: The anchor doesn't work on page when using script
OK. I changed it to:
<a id="photo_2006_2007">Text</a> the problem still remains... if I remove the addthis script the problem remains too... |
|||
|
03-24-2011, 08:02 PM
Post: #6
|
|||
|
|||
|
RE: The anchor doesn't work on page when using script
No it works. I just tried it ... <--- oh no it doesn't
Right now I have no idea what may cause this behaviour. On my site it works perfectly
KoschtIT Image Gallery developer |
|||
|
03-25-2011, 12:13 AM
Post: #7
|
|||
|
|||
|
RE: The anchor doesn't work on page when using script
Ok. I figured it out. The problem is the "koschtitgallery"-div. On your page you have a line-break between opening and closing tag of that div. Please remove the line-break and it will work out I guess. Do it like this:
PHP Code: <div class="koschtitgallery" title="video session" style="margin:auto;"></div> All in one single line ... KoschtIT Image Gallery developer |
|||
|
03-25-2011, 01:48 AM
Post: #8
|
|||
|
|||
|
RE: The anchor doesn't work on page when using script
It's work!
But I noticed something wrong with 2nd gallery. It's loading at its own anchor but after that the page is scrolling to bottom... Please verify if you get the same behavior... http://www.aluzia.net/photo.php#photo_bo..._recording whatever thanks a lot for help.... |
|||
|
03-25-2011, 10:14 AM
Post: #9
|
|||
|
|||
|
RE: The anchor doesn't work on page when using script
The page is not scrolling to the bottom. It is just because zwo galleries shrink in their size after the page has loaded. This is because the $resize_auto - parameter is set enabled. Disable it if you don't need this.
KoschtIT Image Gallery developer |
|||
|
03-25-2011, 01:11 PM
Post: #10
|
|||
|
|||
|
RE: The anchor doesn't work on page when using script
OK. I understood. Thank you!
In my case $resize_auto is common for all 3 galleries. There are free spaces in galleries that contain only one row of photos... well, it's not looking good... Do I need three config files apart for each gallery? ![]() three apart script maps with three different class name? class="koschtitgallery1" class="koschtitgallery2" class="koschtitgallery3"
|
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)






