PDA

View Full Version : DHTML Modal window v1.1



hugh
10-21-2009, 03:35 PM
DHTML Modal window v1.1

http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/dhtmlmodal.htm

Having real trouble with this...

I'm pretty sure I've got all files in the right place (note: I changed the script reference to 'windowfiles/dhtmlwindow.js' as it seemed odd to have the modal files in a sub folder but not the dhtmwindow file)

I'm applying the link to open a new window to an image file. In the programe I use (Freeway for Mac) you can enter an alternative url if it isn't a standard internal page link. So I'm entering:


<a href="#" onClick="purple=dhtmlmodal.open("purplecard", "ajax", "purplecard.html", "The Student Locksmith!", "width=400px,height=400px,resize=1,scrolling=0,center=1"); return false"></a>

Seems simple enough.

But when I publish/preview this page and test the link, I get an error message saying:

The file /Users/poweruser/work/current/Sudden Response/FW1/<a href= cannot be found. Please check the location and try again.

Why is it saying it can't find <a href=.....?? Almost looks like an unclosed <a href> tag, but as you can see above, it's closed. The file purplecard.html exists in the right place.

??

The actual relevant code from the published Freeway page is thus:


<map name="map7">
<area shape=poly alt="home security surveys" coords="0,15,4,4,15,0,116,0,127,4,131,15,131,104,127,115,116,119,15,119,4,115,0,104" href="<a href="#" onClick="purple=dhtmlmodal.open("purplecard", "ajax", "purplecard.html", "The Student Locksmith!", "width=400px,height=400px,resize=1,scrolling=0,center=1"); return false"></a>">
</map>

Anyone spot anything untoward? It's driving me mad!

Thanks,
Hugh