Announcement

Collapse
No announcement yet.

How Can I Show an image instead of text

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How Can I Show an image instead of text

    Pls note blue text, - Thank you in advance for help

    $sql = "SELECT
    answers.answer_correct,
    results_answers.result_answer_iscorrect,
    answers.answerid,
    answers.questionid,
    results_answers.result_answerid,
    results_answers.questionid,
    results_answers.result_answer_text,
    results_answers.resultid

    FROM
    answers, results_answers
    WHERE
    results_answers.resultid = '[resultid]' and
    results_answers.questionid = '[questionid]' and
    answers.questionid = '[questionid]' and
    results_answers.result_answer_text = answers.answerid and
    answers.answerid = '{answerid}'";
    sc_lookup(ds,$sql);
    if (empty({ds}))
    {

    {marcada}= "";

    }
    else
    {
    if ({ds[0][0]}== 1 )
    {
    {marcada} = "Visto Bueno"; //( Here I need the field shows an image instead of text as for example: checklist.png) How can I do it
    sc_field_color ("marcada", "#FF0000");
    }

    else
    {
    {marcada} = "Cruz"; //( Here I need the field shows an image instead of text as for example: crosswrong.png) how can I do it
    sc_field_color ("marcada", "#FF0000");
    }
    }

  • #2
    I think you must use javascript for show image.

    Comment


    • #3
      It depends. One option is to make {marcada} a field of type image and apply an image to that. Or to make it a field of type label and apply html code to show an image.
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development
      www.scriptcase.eu / www.scriptcase.nl

      Comment


      • #4
        If you know the path to your image, just use "echo" to print a HTML <img> element pointing to the image's path.
        Regards,
        Cavadinha

        Development Team
        Netmake - IT Solutions

        Comment


        • #5
          Solved! Thank you very much

          Comment

          Working...
          X