Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Product info in a hidden layer

Featured Replies

Can anybody help me with this little problem i've got. I have a product catalogue in a mysql database which can be queried and return the products a customer is looking for.

 

I want to have a hidden layer which appears when the user hovers over the product description which brings up the price, stock and order button.

 

I have no problem getting the hidden layer to pop up, but i can't seem to get the product information to appear in the box. I am using PHP/MySql to query the database, and obviously the layer is a javascript (onMouseOver) function.

 

Any help / advice would be greatly appreciated

  • Author

Ok.....very basic Javascript for the hidden layer

 

<script language ="JavaScript" type="text/javascript">

<!--

function showLayer() {

document.getElementById("info").style.visibility="visible";

}

function hideLayer() {

document.getElementById("info").style.visibility="hidden";

}

//-->

 

Basic PHP to select the products from the database (excuse my basic PHP)....

 

$q3 = "select * from products where pcode = '$row2[pcode]'";

$r3 = mysqli_query($cxn,$q3) or die ('Error Q3 customer log');

while($row3 = mysqli_fetch_assoc($r3))

{

include("gp.inc");

echo "<table width='70%' style='float: left;'>

<tr>

<td width='40%' onMouseOver='showLayer('info');">$row3[description]</td>

 

 

The <td> with the description listed is where i want the layer to appear above with product info.......

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.