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

  • Home
  • SEARCH
  • 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 7647995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:36:00+00:00 2026-05-31T10:36:00+00:00

I am using jsp for scripting. I have a page where I collect data

  • 0

I am using jsp for scripting. I have a page where I collect data from dropdown boxes and radio buttons and then form a query based on data inserted by the user.

I then hit the url(query here is append to a url i.e a query string) and in return I get an xml file.

I parse the file and formulate it in a particular way in a string which I need to pass it to a javascript function, that renders the graph based on passed values.

I wanted to know how/where should I call the javascript function and pass the JSP string to it so that it can render the graph.

I have tried putting it on OnClick event in the html form but I am not sure if it’s the correct way of doing it. Please let me know how can I go about this porblem.

Form

  • 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-31T10:36:01+00:00Added an answer on May 31, 2026 at 10:36 am

    JSP cannot call JavaScript functions. JSP is a server side view technology which runs in the webserver and generates HTML/CSS/JS output. JavaScript is a client side scripting language which runs in webbrowser and works on HTML DOM tree.

    You can however let JSP print JavaScript code accordingly so that it get executed in the webbrowser once the HTTP response arrives. E.g.

    <script>someFunction('${someString}');</script>
    

    Imagine that ${someString} resolves to a string "foo", then when JSP runs, the webbrowser will retrieve the following:

    <script>someFunction('foo');</script>
    

    (rightclick page in browser and do View Source to see it yourself)

    Once the webbrowser gets to that line, it will then execute the JS function with the string variable which is printed by JSP.

    See also:

    • Our JSP wiki page
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have to import data from a CSV file into MySQL database using JSP/Servlet.
I want to insert data from excel file to MySQL database using JSP. once
i have the following script i am using to scrap data from my uni
I am using jsp and in result of query i have have row whose
I am using jsp and struts2, and I have the following scenario: <s:form> <s:hidden
I am using jsp + spring mvc, and on jsp page I have some
How can I upload files to server using JSP/Servlet? I tried this: <form action="upload"
I'm making a website using JSP and servlets and I have to now break
I'm working on a web application using JSP/Servlets, etc. And I have a lot
I need to read a file from the local file system using JSP, save

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.