Note that there are some explanatory texts on larger screens.

plurals
  1. POAjax display using php to display navigation with image display in directory
    primarykey
    data
    text
    <p>Hi can someone help me with this project here is the image</p> <p>I'm having multiple problems if anyone can help me with this and some coding in here The image.php which has the blue image uses php that get's the image name, description , etc and the image is stored in a directory that the php calls only the name..</p> <p>the problem is that when i call the page the image doesn't show but the data/ strings that comes from the database shows but not the image part how can i fix this??</p> <p>also I have a navigation that connects to a database and shows the product list how can i use ajax here to add the product id name in the database so that i don't have to add more and more files just only one php page that displays the product and it's image in them here are the coding that i have used</p> <p><b>CSS CODES</b></p> <pre><code>&lt;style&gt; #body{ background-image:url(bg0.png); background-repeat:repeat-x; width:100%; height:100%; } #header{ width:90%; height:150px; background-color:#39F; margin:auto; background-image:url(hd.png); border-radius: 15px; -moz-box-shadow: 3px 3px 4px #000; -webkit-box-shadow: 3px 3px 4px #000; box-shadow: 10px 10px 25px #000; } #himg{ border-radius: 0px 0px 0px 15px; } #navi{ float:left; width:20%; height: 500px; margin-left: 74px; margin-top: 10px; border-radius: 100px 0px 100px 0px; overflow:hidden; position:relative; background-color:#456B87; background-image:url(nav1.png); -moz-box-shadow: 3px 3px 4px #000; -webkit-box-shadow: 3px 3px 4px #000; box-shadow: 8px 10px 8px #000; } #navi ol{ clear:left; float:left; list-style:none; margin:0; padding: 0; position:relative; text-align:center; left:50%; vertical-align:middle; display:table-cell; } #navi ol li{ display:block; float:left; list-style:none; margin:0; padding:0; position:relative; right:50%; } #navi ol li details{ border-style:solid; border-radius: 25px 0px 25px 0px; width: 200px; background-color:#FDB735; } #navi ol li details summary::-webkit-details-marker { display:none; } #bod{ background-color:#FFFFFF; float:left; width: 69%; max-width: 69%; margin-left: 9px; margin-top: 10px; height: 500px; max-height: 500px; border-radius: 15px; background-image:url(nav1.png); -moz-box-shadow: 3px 3px 4px #000; -webkit-box-shadow: 3px 3px 4px #000; box-shadow: 10px 10px 15px #000; } #main{ background-color:#FFFFFF; width: 95%; margin-top: 20px; border-radius: 15px; height: 90%; } &lt;/style&gt; </code></pre> <p><b>AJAX / JAVASCRIPT CODE</b></p> <pre><code>&lt;script language="JavaScript" type="text/javascript"&gt; function getXmlHttpRequestObject() { if (window.XMLHttpRequest) { return new XMLHttpRequest(); //Not IE } else if(window.ActiveXObject) { return new ActiveXObject("Microsoft.XMLHTTP"); //IE alert("Your browser doesn't support the XmlHttpRequest object. Better upgrade to Firefox."); } } var receiveReq = getXmlHttpRequestObject(); function catia() { if (receiveReq.readyState == 4 || receiveReq.readyState == 0) { receiveReq.open("GET", 'products/product-display-cat.php', true); receiveReq.onreadystatechange = handleCat; receiveReq.send(null); } } function handleCat() { if (receiveReq.readyState == 4) { document.getElementById('main').innerHTML = receiveReq.responseText; } } &lt;/script&gt; </code></pre> <p><b>End of java script</b></p> <p><b>HTML CODE</b></p> <pre><code>&lt;div id='navi'&gt; &lt;/br&gt; &lt;/br&gt; &lt;ol&gt; &lt;li&gt;&lt;details&gt; &lt;summary&gt;Products&lt;/summary&gt; &lt;table align='center'&gt; &lt;tr&gt; &lt;td&gt;&lt;a href='javascript:cat();'&gt;Catia&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/details&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; </code></pre> <p><b>END OF HTML CODE</b></p> <p><b>This is the original page code that i was calling using ajax</b></p> <pre><code>&lt;?php $result = mysql_query("SELECT * FROM products WHERE ID='6'"); while($row = mysql_fetch_array($result)) {echo" &lt;tr&gt;&lt;td&gt;&lt;img src='image/1361663812.png'&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td colspan='2'&gt;&lt;img src='image/".$row['Logo']."'&gt;&lt;/td&gt;&lt;/tr&gt; &lt;tr&gt;&lt;td&gt;Product: ".$row['Product']."&lt;/td&gt;&lt;/tr&gt; ":} ?&gt; </code></pre> <p><b>This is the end of the original page code</b></p> <p>Some help or even a little help would be very much appreciated here and thanks for your time and effort! Sorry for the javascript i dont know how to show it properly and thanks again</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload