Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6166053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:16:24+00:00 2026-05-23T22:16:24+00:00

Image link in the cakephp is not working $this->Html->link( $this->Html->image(‘image’,array(‘class’ => $class, ‘id’ =>’img_id’

  • 0

Image link in the cakephp is not working

$this->Html->link(  
      $this->Html->image('image',array('class' => $class,
                'id' =>'img_id' )), somelink, array('onclick' =>'jQuery(this).modal({width:600,height:400,left:120,top:100}).open(); return false;'),
                                        array(),
                                        array('escape'=>false));

it will output

<a href='link' onclick='jQuery(this).modal({width:600,height:400}).open(); return false;'> &lt; img src='image_path' &gt;   

it is not escaping &lt and > even if i mention escape=>false, but i am not getting where i am missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T22:16:25+00:00Added an answer on May 23, 2026 at 10:16 pm

    You have too many arguements. Try this:

    echo $this->Html->link(  
      $this->Html->image('image',array('class' => $class,
                'id' =>'img_id' )), 'foo', array('escape'=>false, 'onclick' =>'jQuery(this).modal({width:600,height:400,left:120,top:100}).open(); return false;')
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to write a valid header/link/image? Something like <a href=index.html><h1 id=logo>Company
I have a bmp image link, this image I would like to save in
Regarding to this image: link text I have an object, 'rezultat', which has getters
How to remove first link with image from this text with PHP? <a href=some
I have a variable which holds a relative link for an image. This image
A good example is www.espacio asir.com, which gives this result: image-link: http://api.browsershots.org/png/original/50/509a78b11505752692d066f07fff6661.png I don't
I'm new to cakephp and I want to make a link with an image.
i have seen this is Facebook, when the user paste the image link www.blahblah.blah\blah.jpg
I want to overrule the onclick on a parent div, when an image-link in
if I display one image link from a folder how can I use this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.