modal window links in fotonote tags....

Discussion in 'PHP' started by ahdsan, Dec 11, 2010.

  1. #1
    I am using fotonotes to display tags on images.
    Now within the tags I need links on clicking which it should open a modal window.
    I am using fancybox for the same.
    Now the problem is, when i execute index.php, tags get displayed and in the tags when i click the link, it doesn't open the fancybox instead opens it as a new page.
    When I copy the whole html and save it as html file and execute the same, it works fine.
    There is no javascript error also.
    Not able to understand what is the problem.
     
    ahdsan, Dec 11, 2010 IP
  2. shofstetter

    shofstetter Well-Known Member

    Messages:
    178
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    120
    #2
    you can specify a target in you link code to make sure it will open in the same window ex:

    <a href="" target="_top">bla</a>
     
    shofstetter, Dec 12, 2010 IP
  3. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #3
    Very bad code! target="" is deprecated a long time ago, and should not be used.

    @ahdsan: do you have a demo up and running somewhere? Or can you paste the code you're using? Hard to tell what the problem is without seeing the actual code, or site where it's not working. It might be that you're doing some sort of js-insert or pull that causes the js to not execute when the actual tags are there, or getting parsed. It might be a lot of things. When you run the output (ie. HTML-code) everything is ready parsed, and therefore there is no problem. I'd take a look at how you insert the tags/the Fancybox-code.
     
    PoPSiCLe, Dec 15, 2010 IP
  4. shofstetter

    shofstetter Well-Known Member

    Messages:
    178
    Likes Received:
    7
    Best Answers:
    1
    Trophy Points:
    120
    #4
    shofstetter, Dec 15, 2010 IP