JHTML::image() not working correctly

For Joomla! 1.5 Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general
Locked
numerical25
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Sat Aug 22, 2009 2:42 pm

JHTML::image() not working correctly

Post by numerical25 » Sat Jun 12, 2010 4:11 pm

I know its probably something I am doing wrong but I can't figure it out. I am trying to pull a image onto the page like so..

Code: Select all

<?php echo JHTML::image("images/skating.png",""); ?>
But no image appears. anyone have any ideas.

I do have JHTML imported as well

User avatar
H13
Joomla! Ace
Joomla! Ace
Posts: 1545
Joined: Sun Dec 10, 2006 6:39 pm
Location: Czech Republic
Contact:

Re: JHTML::image() not working correctly

Post by H13 » Sat Jun 12, 2010 4:30 pm

Hi, see your HTML code of the image, maybe the url to the image is wrong - you should see the whole url to the image in your html code.

Jan
- Phoca Cart - Joomla eCommerce App - https://www.phoca.cz/phocacart
- Phoca Gallery - powerful image gallery
- Phoca Restaurant Menu - https://www.phoca.cz/phocamenu
- Phoca Download - download manager for Joomla

numerical25
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Sat Aug 22, 2009 2:42 pm

Re: JHTML::image() not working correctly

Post by numerical25 » Sat Jun 12, 2010 4:38 pm

this is the html

Code: Select all

<img alt="" src="/skateZone2/images/skating.png">
I am doing this on my computer by the way so my websites url is

Code: Select all

http://localhost/skateZone2/

User avatar
H13
Joomla! Ace
Joomla! Ace
Posts: 1545
Joined: Sun Dec 10, 2006 6:39 pm
Location: Czech Republic
Contact:

Re: JHTML::image() not working correctly

Post by H13 » Sun Jun 13, 2010 10:45 am

Looks like the url is OK, does the image exist on your server in this folder?

Jan
- Phoca Cart - Joomla eCommerce App - https://www.phoca.cz/phocacart
- Phoca Gallery - powerful image gallery
- Phoca Restaurant Menu - https://www.phoca.cz/phocamenu
- Phoca Download - download manager for Joomla


Locked

Return to “Joomla! 1.5 Coding”