Solved

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

Posted on 2011-03-07
2
759 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
Comment Utility
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
Comment Utility
Thanks Brook for your reply. I am quite busy today however I will test it tomorrow.

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Hello World !, Thanks : My Sincere thanks to @Michael Male who encouraged me to write an article on this in my  blog (http://scribblejava.wordpress.com). Introduction:       There are several technical issues a developer may face in his…
There is basically two types of AJAX request in mootools. Request  and Request.HTML Request: Request is the basic XHR request class in MooTools. While not extremely useful on its own, it provides the basic functionality for both Request.HTM…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now