Solved

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

Posted on 2011-03-07
2
797 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
2 Comments
 
LVL 14

Accepted Solution

by:
Brook Braswell earned 250 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

ASP.NET AJAX callbacks to web service are becoming very popular and unavoidable these days. The feel that the user gets when only a part of the page is updated without even hindering the UI is the advantage that the callbacks offer. The wait for the…
Hi,      I've been learning Spring and Jersey for the past few months and to say in simple, i am pretty much impressed with these frameworks. Many developers feel it awkward to implement a RESTful Web Services with such a popular Web Application Fr…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.

810 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