Popup Alert

User 437873 Photo


Registered User
43 posts

I'm trying to apply the JavaScript Alert Popup (code is in the CC HTML Editor) to images on my site, but it doesn't seem to work. This is the script: <a onClick="alert('You will be able to choose this option in the shopping cart')">xxxxxxxxxxx</a> (where the xxxx's are is where I think the image reference should be).

The images are in a table. I want to pop up a message when they are clicked. How can I do that, or does it only work on text outside of tables? Another possibility (although I doubt it) is that the page must be of a type other than .html.

Here's the table code:
<table style="BORDER-BOTTOM-COLOR: ; BORDER-TOP-COLOR: ; WIDTH: 100%; BORDER-RIGHT-COLOR: ; BORDER-LEFT-COLOR:"
border="0"
cellspacing="1"
cellpadding="2">
<tbody>
<tr>
<td style=
"BORDER-BOTTOM-COLOR: ; BORDER-TOP-COLOR: ; WIDTH: 104px; BORDER-RIGHT-COLOR: ; BORDER-LEFT-COLOR:"
valign="top"
align="center"><img style=
"BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 100px; HEIGHT: 80px; BORDER-TOP: black 1px solid; BORDER-RIGHT: black 1px solid"
title="Extra chairs"
border="0"
alt="Extra chairs"
src="images/ModernChair-100px.jpg"><br>
<span style="FONT-SIZE: 8pt">Add Extra Chairs</span></td>

<td style=
"BORDER-BOTTOM-COLOR: ; BORDER-TOP-COLOR: ; WIDTH: 104px; BORDER-RIGHT-COLOR: ; BORDER-LEFT-COLOR:"
valign="top"
align="center"><img style=
"BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 100px; HEIGHT: 80px; BORDER-TOP: black 1px solid; BORDER-RIGHT: black 1px solid"
title="Larger table"
border="0"
alt="Larger table"
src="images/DiningTable-100px.jpg"><br>
<span style="FONT-SIZE: 8pt">Larger Table</span></td>

<td style=
"BORDER-BOTTOM-COLOR: ; BORDER-TOP-COLOR: ; WIDTH: 104px; BORDER-RIGHT-COLOR: ; BORDER-LEFT-COLOR:"
valign="top"
align="center"><img style=
"BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 100px; HEIGHT: 80px; BORDER-TOP: black 1px solid; BORDER-RIGHT: black 1px solid"
title="Fabric choices"
border="0"
alt="Fabric choices"
src="images/swatches-100px.jpg"><br>
<span style="FONT-SIZE: 8pt">500 Fabric Choices</span></td>

<td style=
"BORDER-BOTTOM-COLOR: ; BORDER-TOP-COLOR: ; WIDTH: 104px; BORDER-RIGHT-COLOR: ; BORDER-LEFT-COLOR:"
valign="top"
align="center"><img style=
"BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 100px; HEIGHT: 80px; BORDER-TOP: black 1px solid; BORDER-RIGHT: black 1px solid"
title="Pipe colors"
border="0"
alt="Pipe colors"
src="images/2pipecolors-100px.jpg"><br>
<span style="FONT-SIZE: 8pt">Pipe Colors</span></td>

<td style=
"BORDER-BOTTOM-COLOR: ; BORDER-TOP-COLOR: ; WIDTH: 104px; BORDER-RIGHT-COLOR: ; BORDER-LEFT-COLOR:"
valign="top"
align="center"><img style=
"BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 100px; HEIGHT: 80px; BORDER-TOP: black 1px solid; BORDER-RIGHT: black 1px solid"
title="Umbrellas"
border="0"
alt="Umbrellas"
src="images/Umbrella-100px.jpg"><br>
<span style="FONT-SIZE: 8pt">Add Umbrella</span></td>

<td style=
"BORDER-BOTTOM-COLOR: ; BORDER-TOP-COLOR: ; WIDTH: 104px; BORDER-RIGHT-COLOR: ; BORDER-LEFT-COLOR:"
valign="top"
align="center"><img style=
"BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; WIDTH: 100px; HEIGHT: 80px; BORDER-TOP: black 1px solid; BORDER-RIGHT: black 1px solid"
title="Umbrella bases"
border="0"
alt="Umbrella bases"
src="images/UmbrellaBase-100px.jpg"><br>
<span style="FONT-SIZE: 8pt">Add Umbrella Base</span></td>
</tr>
</tbody>
</table>

Thanks for any help you can provide.
User 122279 Photo


Senior Advisor
14,649 posts
Online Now

I don't know that particular pop-up script, it might be just for text.

I'm using a different one here: www.johnsflats.com on the right side. I think even there is a 'how to' on Eric Rohloff's help site, see his signature.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 187934 Photo


Senior Advisor
20,271 posts

http://progrower.coffeecup.com/popup.html
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.