[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 973
  • Last Modified:

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

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
davidw88
Asked:
davidw88
1 Solution
 
Brook BraswellApplication Development ManagerCommented:
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
 
davidw88Author Commented:
Thanks Brook for your reply. I am quite busy today however I will test it tomorrow.

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now