Posted by: Christian J Sep 12 2006, 05:15 PM
Hi!
QUOTE
if i press on "text" i want image on right side to swap with other image
This can't be done with only HTML, you must use e.g. javascript. Unless DW contains such a script you'll have to search the web for one, or write one yourself.
QUOTE
and is it possible to swap "table id" ?
You mean, change the ID of a table? Yes that can be done with javascript too.
Posted by: Darin McGrew Sep 12 2006, 05:53 PM
QUOTE
if i press on "text" i want image on right side to swap with other image
QUOTE(Christian J @ Sep 12 2006, 03:15 PM)
This can't be done with only HTML, you must use e.g. javascript.
FWIW, here's http://meyerweb.com/eric/css/edge/popups/demo2.html (but no JavaScript).
Posted by: CodeKing Sep 12 2006, 07:42 PM
QUOTE
if i press on "text" i want image on right side to swap with other image
function swapImage(ID,src)
{
document.getElementsById(ID).src = src;
}
<a href="java script: swapImage('myImage','http://www.mysite.com/image.gif');">Swap image!</a>
QUOTE
and is it possible to swap "table id" ?
function swapTableId(oldID,newID)
{
document.getElementsById(oldID).id = newID;
}
<a href="java script: swapTableID('myTable','newTable');">Swap table ID!</a>
(Try that. I'm not sure if it'll work.)
CodeKing
Posted by: Darin McGrew Sep 13 2006, 12:49 AM
Just a quick comment on the href="java script:..." links: It's better to use the onclick event handler, and to put a real URL in the href attribute.
Posted by: Frederiek Sep 13 2006, 02:07 AM
In addition to the link Darin gave: to swap an image AND text, then go see http://meyerweb.com/eric/css/edge/popups/demo3.html from Eric Meyer.
Posted by: Christian J Sep 13 2006, 09:25 AM
QUOTE(Darin McGrew @ Sep 13 2006, 12:53 AM)
QUOTE
if i press on "text" i want image on right side to swap with other image
QUOTE(Christian J @ Sep 12 2006, 03:15 PM)
This can't be done with only HTML, you must use e.g. javascript.
FWIW, here's http://meyerweb.com/eric/css/edge/popups/demo2.html (but no JavaScript).
True, but that only works while the mouse hovers, not permanently like when you click. If that's an important distinction is another issue.