Javascript onSubmit Event
<pre><code>var themes2="dark";     
if(isCanvasSupported()){
            $('#body-wrapper').after('&lt;div id="palette"&gt; \
        &lt;div id="paletteHeader"&gt; \
            &lt;div id="colorResult"&gt;#0199FE&lt;/div&gt; \
            &lt;a href="javascript:void(0);" class="closeButton"&gt;&lt;/a&gt; \
            &lt;a href="javascript:void(0);" class="openButton"&gt;&lt;/a&gt; \
        &lt;/div&gt; \
    &lt;div id="paletteBody"&gt; \
        &lt;div id="colorPicker"&gt;&lt;/div&gt; \
        &lt;canvas id="colorPalette" width="150" height="150"&gt;&lt;/canvas&gt; \
    &lt;/div&gt; \
    &lt;div id="ThemeSwitch"&gt; \
        &lt;a class="themeBtn light " href="javascript:void(0)" onclick="changeTheme(\'light\')"&gt;LIGHT&lt;/a&gt; \
        &lt;a class="themeBtn dark selected" href="javascript:void(0)" onclick="changeTheme(\'dark\')"&gt;DARK&lt;/a&gt; \
    &lt;/div&gt; \
    &lt;form name="myform" method="post" onSubmit="**return onsubmitform()**;"&gt;
    &lt;input type="submit" value="Kaydet"&gt; \
    &lt;/form&gt; \
&lt;/div&gt;');
</code></pre>

<p>I coding something.in return onsubmitform() form action make nothing.
onsubmitform function:</p>

<pre><code>function onsubmitform()
{
  document.myform.action ="?tasarim="+themes2;
  return true;
}
</code></pre>

<p>I want something "index.php?tasarim=dark" but browser redirecting only "index.php"...
What can i do for this?</p>
