How can I put a link inside an ajax file?

How can I put a link inside an ajax file?

aismenaismen Posts: 11Questions: 2Answers: 1
edited June 2015 in Free community support
{ "aaData": [
    [ "<a src=‘http://www.google.com/' target=‘_blank’>test</a>" ]
] }

In this way I correctly see the link in the table (blue and underlined) but it doesn't work if I click it

Anyone can tell me how can I solve?

Thanks :)

This question has accepted answers - jump to:

Answers

  • aismenaismen Posts: 11Questions: 2Answers: 1

    Please help me

    http://www.methodo.biz/test/

    Thanks!

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin

    The HTML you have is invalid. It looks like you have "smart" quotes. Just use an apostrophe.

    Allan

  • aismenaismen Posts: 11Questions: 2Answers: 1

    Tried but nothing change, please tell me more, I'm not an expert

    Thanks!

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin

    The JSON file being loaded still looks wrong to me:

    [ "6", "Mo", "Pu", "P9C 5B6", "<a src=“http://www.google.com/“prova</a>" ]

    Allan

  • aismenaismen Posts: 11Questions: 2Answers: 1
    edited June 2015

    Which character should I put before and after the link?

    I've tried different solutions but nothing change

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin

    Just use an apostrophe.

    :-)

  • aismenaismen Posts: 11Questions: 2Answers: 1

    Now it's

    [ "6", "Mo", "Pu", "P9C", "<a src='http://www.google.com/'>prova</a>" ]
    

    but it doesn't work :(

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    "<a src=\"http: //www.google.com/\">prova</a>"

  • aismenaismen Posts: 11Questions: 2Answers: 1

    Not working but thanks :(

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    [
        "6",
        "Mo",
        "Pu",
        "P9C",
        "<a src=\"http://www.google.com/\">prova</a>"
    ]
    

    It is valid JSON.

  • aismenaismen Posts: 11Questions: 2Answers: 1

    The link appear but it doesn't work :(

  • aismenaismen Posts: 11Questions: 2Answers: 1

    Sorry it was my error, it works :)

    (not src but href) !!!

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    Answer ✓

    I can't believe I missed that.... :-(

  • aismenaismen Posts: 11Questions: 2Answers: 1

    Hehehe me and allan too :)

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin
    Answer ✓

    One of them days... :-)

This discussion has been closed.