Jump to content

Ошибка [object HTMLInputElement]1


Recommended Posts

Уважаемые Simpla'чане! Буду очень признателен Вам, если поможете устранить ошибку в браузере Chrome - в product.tpl стоит счетчик количества товаров, т.е. покупатель жмет на "+/-", тем самым выставляя нужное ему количество. Во всех браузерах всё отлично работает, кроме Chrome. Нажимаю на "+", получаем:

[object HTMLInputElement]1


затем нажимаю на "-", в счетчике выставляется "1". В чем может быть проблема?

Код:

< a href=\ " javascript:void(0);\ " title=\ " Уменьшить\ " onclick=\ " amount=parseInt($( ' #amount ' ).val()); $( ' #amount ' ).val(amount>1 ? amount-1 : 1);\ " class= \ "minus \ ">-< / a >
< input type= \ "text \ " name=\ "amount\ " id=\ " amount\ " readonly=\ " readonly\ " value=\ " 1\ " />
< a href=\ " javascript:void(0);\ " title=\ " Увеличить\ " onclick=\ " amount=parseInt($( ' #amount ' ).val()); $( ' #amount ' ).val(amount+1);\ " class= \ " plus\ " >+< /a >
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...