close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

have to double click a form button to make this work

Thread began 5/09/2011 2:11 am by Miguel | Last modified 5/09/2011 3:08 pm by Miguel | 1026 views | 1 replies


have to double click a form button to make this work

Hello webassist team im building a websiute that is multi language, spanish and english, im trying to use the cookies toolkit to acomplish this instead of a link, i build a form with 2 input image buttons flags for each language, i added the set cookie value to detect when each of these are clicked but i have to double or click twice in order for the cookie to work, my point is that the text called from the database will be filtered depending on wich cookie value is selected.

Why do i have to double click what am i doing wrong why cant it work with just a single click over the buttons.

Please help

if (isset($_POST["en_x"]))     {
setcookie("lengua""".((isset($_POST["eng"]))?$_POST["eng"]:"")  .""time()+(60*60*24*30), "/"""0);
if (isset($_POST["es_x"]))     {
setcookie("lengua""".((isset($_POST["esp"]))?$_POST["esp"]:"")  .""time()+(60*60*24*30), "/"""0);
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script  src="../WA_Cookies/Cookies.js"></script>


<div id="Logo"><a href="../index.php"><img  src="../images/logo.png" alt="Vianpower" width="115" height="68" border="0" /></a></div>
    <div id="Navegacion">
    <div align="right"><form method="post"  action="<?php echo (htmlentities($_SERVER["PHP_SELF"]));?><?php echo(isset($_SERVER['QUERY_STRING'])?"?".str_replace("<","%3C",str_replace(">","%3E"str_replace('"',"%22"$_SERVER['QUERY_STRING']))):""); ?>"  id="lan" name="lan">
      <div class="languagechoice">
        <input type="image" name="en"  src="../images/flagsus.gif" />
        <input type="image" name="es"  src="../images/flagses.gif" />

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...