Toka
09-07-2003, 02:26 AM
I have another problem for anyone that can help me. I have wrote a bit of code to select a country and go to to different pages one for english & one for chinese. It works great with a button, I want to adapt it so that instead of a button I can have a small image that when the country is selected and this is clicked it will take them to the required page for that country.
At the moment, I have the following, this is pass through html within the head within lotus notes.
<FORM ACTION="default.cgi" METHOD="POST"
ENCTYPE="application/x-www-form-urlencoded">
<SCRIPT language="JavaScript"><!-- Hide the script from old browsers --
function surfto(form) {
var myindex=form.dest.selectedIndex
location=form.dest.options[myindex].value;
}
//--> </SCRIPT>
<right>
<P><SELECT NAME="dest">
<OPTION VALUE="0" selected> Select a Language </OPTION>
<OPTION
VALUE="Englishpage">English
</OPTION>
<OPTION
VALUE="Chinesepage">Mandarin</OPTION></SELECT>
<input type="button" value="Go" onClick="surfto(this.form)">
</FORM>
This works but I can't get it to work with an image instead of a button, could anyone out there help.
I have tried changing the bottom line relevant to image instead of button, but this dosen't seem work
Can any one give any suggestions
Cheers
At the moment, I have the following, this is pass through html within the head within lotus notes.
<FORM ACTION="default.cgi" METHOD="POST"
ENCTYPE="application/x-www-form-urlencoded">
<SCRIPT language="JavaScript"><!-- Hide the script from old browsers --
function surfto(form) {
var myindex=form.dest.selectedIndex
location=form.dest.options[myindex].value;
}
//--> </SCRIPT>
<right>
<P><SELECT NAME="dest">
<OPTION VALUE="0" selected> Select a Language </OPTION>
<OPTION
VALUE="Englishpage">English
</OPTION>
<OPTION
VALUE="Chinesepage">Mandarin</OPTION></SELECT>
<input type="button" value="Go" onClick="surfto(this.form)">
</FORM>
This works but I can't get it to work with an image instead of a button, could anyone out there help.
I have tried changing the bottom line relevant to image instead of button, but this dosen't seem work
Can any one give any suggestions
Cheers