Click to See Complete Forum and Search --> : country option box


Toka
09-05-2003, 02:24 PM
Hi, thanks for the previous help charles, much appreciated.

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.

Cheers

Xin
09-05-2003, 02:42 PM
you can try:

<input type="image" src="..." onclick="surfto(this.form)">

or just normal image link

<a href="javascript:surfto(document.forms[0])"><img src="..."></a>

Toka
09-05-2003, 03:48 PM
Hi Thanks

I have tried the first option, that wouldn't work but I will try the second option.

Thanks

Toka
09-06-2003, 09:14 AM
Hi

I have tried both options and none of them work. Anybody else have any idea's