Hi
This is the form:
<form action="#CGI.SCRIPT_NAME#"
<input name="de" type="image" src="../img/FLAGS/Germany.
<input name="eng" type="image" src="../img/FLAGS/United_K
<input name="gr" type="image" src="../img/FLAGS/Greece.s
</form>
And in the application.cfm i have this:
<cfparam name="cookie.lang" default="de">
<cfif IsDefined("form.de.x") AND form.de.x NEQ cookie.lang >
<!--- DE --->
<cfcookie name="lang" value="de" expires="never">
<cfelseif IsDefined("form.eng.x") AND form.eng.x NEQ cookie.lang>
<!--- ENG --->
<cfcookie name="lang" value="eng" expires="never">
<cfelseif IsDefined("form.gr.x") AND form.gr.x NEQ cookie.lang>
<!--- GR --->
<cfcookie name="lang" value="gr" expires="never">
</cfif>
This is not working.
By the way the solution with the three forms is working.Is this wrong?
Is it better to use url variable?
Main Topics
Browse All Topics





by: duncancummingPosted on 2009-03-18 at 11:37:27ID: 23922042
When you submit using an image, the value passed will be the x/y coordinates of where you clicked. The value attribute is ignored. So for instance this: svg.png" />
ta" if you're submitting a file in the form.
<input name="lang" type="image" value="de" src="../img/FLAGS/Germany.
will be available on the processing page as
Form.lang.x
Form.lang.y
So by having three buttons with the same name, you won't be able to tell them apart. Instead I suggest you try the following.
PS: you only need enctype="multipart/form-da
Select allOpen in new window