Click to See Complete Forum and Search --> : Show image in popup


kuifjexx
02-28-2003, 06:25 AM
To show an image of a book, I use the following code:
function PopIt(page,label)
{
popup = window.open(page,"popDialog","height=380,width=215,scrollbars=no")
popup.document.close()
}

A window opens with a specific html-page including an image
by using <a href="JavaScript: PopIt('book1.htm','')">

How can i modify this so that i do not have to create several html-pages with different images

TIA

Greetz from Belgium

Luc aka kuifjexx

Charles
02-28-2003, 06:45 AM
But what about the one in ten users that do not use JavaScript? And be aware, that if you are in the United States and you are engaging in a commercial enterprise then title III of the Americans With Disabilities Act applies to you (http://www.usdoj.gov/crt/ada/pubs/ada.txt), that the US Department of Justice is of the opinion that the internet and all electronic media are covered by the ADA (http://www.usdoj.gov/crt/foia/tal712.txt) and that the W3C accessibility guidelines require that you "[e]nsure that pages are usable when scripts, applets, or other programmatic objects are turned off or not supported." (http://www.w3.org/TR/WCAG10/).

Keep the HTML documents or, if you prefer, use just the image and use the following for your links:

<script type="text/javascript">
<!--
function newWin (url) {window.open (url, 'child', 'height=380,width=215'); return false}
// -->
</script>

<a href="book1.htm" onclick="return newWin (this.href)">Book One</a>

kuifjexx
02-28-2003, 07:22 AM
Thanks

It works!!!

Greetz from Belgium

Luc aka kuifjexx