?
Solved

Spring: is it possible to get this value in javaScript?

Posted on 2011-03-07
2
Medium Priority
?
942 Views
Last Modified: 2012-06-21
Hello experts,

On my webpage there is a "submit" button. If I click the button, then controller module is invoked. The controller passes value ("ModelAndView") back to the webpage.

In the webpage there is a javaScript section. Is it possible to catch the "ModelAndView" object value in the javaScript section?

Thanks.
0
Comment
Question by:davidw88
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 14

Accepted Solution

by:
Brook Braswell earned 1000 total points
ID: 35070203
When you say it passes the value back...are you receiving this as a parameter?
in PHP the $_GET would handle that...
if ModelAndView is and actual object in your page
pagename in this example would be the document form name


<script>

var iVal = document.pagename.ModelAndView.value;
// OR
var iVal2 = document.getElementById["ModelAndView"];

</script>

Open in new window

0
 

Author Comment

by:davidw88
ID: 35070865
Thanks Brook for your reply. I am quite busy today however I will test it tomorrow.

0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question