Ankur Saxena
Ankur Saxena

Reputation: 639

jquery create problems

 <link rel="stylesheet" href="{$base_url}resources/themes/{$set_theme}/css/jquery-ui.css" />
    <script type="text/javascript" src="{$base_url}resources/javascript/jquery/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="{$base_url}resources/javascript/jquery/jquery-ui.js"></script>
    <script type="text/javascript">jQuery.noConflict();</script>

<form action="{$base_url}{$fil_index_register}" id="register" method="post" autocomplete="off">
date of brith:<input type="text" maxlength="50" name="cal" value="" class="" id="ds" >
<input type="button" name="button" onclick="javascript:$('register').submit();" value="ACCOUNT_040" class="button" />

</form>


<script type="text/javascript"> 
        {literal}

        $(function(){
            $( "#ds" ).datepicker({ dateFormat: "dd-mm-yy" });

        });

        {/literal}
    </script>

problem:-when i include js script script submit button is not working but js of calender is working and when remove js script submit button starts works.please help me.i am implementing this on pixaria software

Upvotes: 0

Views: 52

Answers (3)

Ankur Saxena
Ankur Saxena

Reputation: 639

"$" create the problem so i avoid "$" i used

onclick="javascript:document.forms['register'].submit();

Upvotes: 1

gamehelp16
gamehelp16

Reputation: 1101

so, you mean that the submit button is not working?? well, here's the solution:

change the:

$('register')

to:

$('#register')

'#' symbol is identifier for id '.' symbol is for class and no symbol is for HTML tags

Hope this works

Upvotes: 0

Athlan
Athlan

Reputation: 6619

You need to call:

$('#register').submit();

You have forgot about # (select for element's ID)

Upvotes: 0

Related Questions