Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6888437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:00:56+00:00 2026-05-27T06:00:56+00:00

I have my webapplication structured like this: Main page with n links and a

  • 0

I have my webapplication structured like this:

Main page with n links and a tabbed structure

Every link opens a tab in the tabbed structure of the main page and with ajax loads the page in the tab

Because every page needs different javascript functions (mainly for the init part) in the complete function of the ajax load I load the .js script and execute it.

Now I have a problem: I need to have a text editor in one of these tabs, so I chose TinyMCE. It needs to be initialized, but only once, otherwise it will crash.
Now I need a way to check how many times the user opened the tab.

I was looking for variables scopes in jsps, and found “Session Scope”. I know server side session variables cannot be accessed from clients, but these session scope variables in the jsp are client side, so I thought I would be using a session variable jsp side to count how many times the user clicks on the link.

In the main jsp I put:

<c:set var="timesEditorLoaded" value="0" scope="session" />

The link which opens the editor is:

<a tabindex="22" id="proposte_propostaTesto_a" class="colorbox" href="${pageContext.request.contextPath}/editorPopup?hiddenCallerFormElementId=proposte_propostaTesto&" onClick="incrementEditorVariable();">Apri editor</a>

The function incrementEditorVariable() is:

<script type="text/javascript">
function incrementEditorVariable()
{
    alert("incrementEditorVariable: " + timesEditorLoaded);
    timesEditorLoaded = timesEditorLoaded + 1;
}
</script>

but in Chrome I get:

Uncaught ReferenceError: incrementEditorVariable is not defined

If I put the function incrementEditorVariable in an external .js file, how can I access the session variable stored in the jsp?
Is there a way to accomplish this?
Thank you in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:00:57+00:00Added an answer on May 27, 2026 at 6:00 am

    I ended up adding a session variable to the MVC architecture, and accomplished this task. I was doing this to try to repair a bug, I accomplished to count the number of times the user clicked on a link to prevent to init n-times a TinyMCE instance, but this didn’t solve the problem of the menus staying open.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What are any reccomendations for the following. I have a structure like this. --ApplicationServices
Generally, MVC frameeworks have a structure that looks something like: /models /views /controllers /utils
I have simple web application based on JSP. Root of application looks like this:
I'm making a web application that uses hash tags for page navigation like this
I have a complex input form within a PHP based web application. To structure
I have two webapplication, one is a simple authenticationsite which can authenticate the logged
I have a WebApplication project, a business logic project, and a WebDeployment project for
I have developed a webapplication in both ASP.NET MVC and ASP.NET Webforms and i'm
I have build a webapplication using ASP.NET MVC and JQuery. On my local machine
I have a .Net 2.0/3.5 WebApplication. I want to be able to take money

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.