Hi all ... this was a problem that was asked and solved for version 6. We now want to use the code under version 7, but are having the devils own job getting it working. This is what comes of knowing just enough of something to be dangerous :-)
I've pasted the code below. Basically, it takes an image, records if the respondent clicked on the nominated grid reference or not, and then submits the page. I got that SSI_subSubmitMe() (under version 6) is now SSI_SubmitMe() under version 7 but just changing that didn't work. Is anyone able to help me out please?
<input name="P17tuna1_var" type="hidden">
<IMG SRC="[%GraphicsPath()%]YLC-TUNA-SHELF-2.jpg" width="900" height="600" border="0" usemap="#Map">
<MAP NAME="Map">
<!-- <AREA SHAPE="rect" COORDS="0,0,900,600" value="9" onClick="[our javascript function](this) -->
<AREA SHAPE="rect" COORDS="0,0,276,24" alt="0" onClick="store(this)">
<AREA SHAPE="rect" COORDS="277,0,587,24" alt="0" onClick="store(this)">
<AREA SHAPE="rect" COORDS="588,0,900,24" alt="0" onClick="store(this)">
<AREA SHAPE="rect" COORDS="0,25,276,275" alt="0" onClick="store(this)">
<AREA SHAPE="rect" COORDS="277,25,587,275" alt="1" onClick="store(this)">
<AREA SHAPE="rect" COORDS="588,25,900,275" alt="0" onClick="store(this)">
<AREA SHAPE="rect" COORDS="0,276,276,600" alt="0" onClick="store(this)">
<AREA SHAPE="rect" COORDS="277,276,587,600" alt="0" onClick="store(this)">
<AREA SHAPE="rect" COORDS="588,276,900,600" alt="0" onClick="store(this)">
</MAP>
<SCRIPT LANGUAGE="JavaScript">
<!--
var response = new Array();
response[0] = document.mainform.P17tuna1_var;
var clicked = 0;
function store(area) {
response[clicked].value = area.alt;
clicked++;
if(clicked == 1) {
SSI_SubmitMe();
}
}
//-->
</SCRIPT>
p.s. we're on 7.0.22.