Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Calling a JavaScript function from within another JavaScript function

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi everybody,
I have a Title field, which I control the filed from within a JavaScript function with the following line. It works properly. The length of the filed is controlled by maxlength html property.



I’m trying to modify the filed, to be able to let user know how many chars he entered and how many chars are remaining, so I need to call the charCounter() function from within the first function.
This is my code, it does not give me any error message but does not do anything either! Does anybody know what I’m doing wrong?

 
R Naijat
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I modified the part that I call the charCounter() function as follows but now receive this error:

The function charCounter must be used with a prefix when a default namespace is not specified

 
Sheriff
Posts: 67734
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
The code contains JSP -- that makes this a JSP question. Please continue any questions about JSP in your other topic on this issue.

If you have JavaScript questions, you need to post the rendered HTML and JavaScript that is sent to the browser without any JSP markup.
 
The first person to drink cow's milk. That started off as a dare from this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
    Bookmark Topic Watch Topic
  • New Topic