Jump to content

Recommended Posts

I have followed the procedure at http://community.linuxmint.com/tutorial/view/486 to install LAMP on my Mint 13 laptop with a view to developing locally & once working emigrate to my server but ...... the following simple HTML only displays the title(No image). The image does exist in the images folder & it makes no difference if I refer to it with ./images/prince.jpg or images/prince.jpg.

Please tell me how I got the install wrong.

<!DOCTYPE html>
<html>
<title>Jim Beam</title>
<meta name="author" content="Alf C Stockton">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="Mon, 22 Jul 2000 11:12:01 GMT" />
<meta name="viewport" content="width=device-width,initial-scale=1">
<script language="Javascript" src="./js/prince.js"></script>
</head>
<body>
<center>
<img src="./images/prince.jpg" alt="Jim Beam" usemap="#prince" />
<map name="prince">
<area shape="rect" coords="300,170,350,200" onclick="javascript:gotoFirst();" />
<area shape="rect" coords="530,245,540,255" onclick="javascript:gotoSecond();" />
<area shape="rect" coords="520,180,540,200" onclick="javascript:gotoThird();" />
</map>
</body>
</html>

BTW Something very similar works fine on my website at http://www.stockton.co.za/doc/jones

Link to comment
https://forums.phpfreaks.com/topic/269712-linux-mint-lamp-install/
Share on other sites

images/ and ./images/ is exactly the same, only difference is that the former you've implicitly specified the curent folder and in the latter you've explicitly specified it.

Reason you're seeing a broken image is because the path/filename is wrong, and thus the browser can't find it at the specified location. Check that everything is the exact same case, and that the image folder is located in the same folder as the index script.

 

PS: javascript: should not be used in onclick and other such intrinsic event handlers. In fact it should never be used, as is is a relic from the early days of Javascript (and poor/no browser support for event handlers).

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.