• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What does postAction do, unable to understand the code snippet mentioned by me in this thread

 
Ranch Hand
Posts: 1087
Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am unable to understand the below code in .js file, here is the var declared as jsonString , is it simply a variable or is it something predefined.

if jsonString is simply a variable , then how is the value assigned to it like '{"Opportunity_id" : "'+oppId+'"}';

Does that mean json is acceptiong String value?

And what does postAction mean and do?

Please note:i am using Structs framework, will postaction first search for poicr in the structs.xml file? and what is the second and third argument mentioned in postAction

 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Vishal Hegde wrote:I am unable to understand the below code in .js file, here is the var declared as jsonString , is it simply a variable or is it something predefined.


jsonString is just a variable to which a string is assigned.

if jsonString is simply a variable , then how is the value assigned to it like '{"Opportunity_id" : "'+oppId+'"}';


Don't know what you are asking here. It's simply a string. It represents a JSON object.

Does that mean json is acceptiong String value?


It just means that a variable is being assigned a string.

And what does postAction mean and do?


No way of knowing. it might be a function defined elsewhere in the page, or by an included script. It is not part of standard JavaScript or the DOM API.

Please note:i am using Structs framework


You must mean Struts. Please take more care when posting.

 
Vishal Hegde
Ranch Hand
Posts: 1087
Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:

Vishal Hegde wrote:I am unable to understand the below code in .js file, here is the var declared as jsonString , is it simply a variable or is it something predefined.


jsonString is just a variable to which a string is assigned.

if jsonString is simply a variable , then how is the value assigned to it like '{"Opportunity_id" : "'+oppId+'"}';


Don't know what you are asking here. It's simply a string. It represents a JSON object.

Does that mean json is acceptiong String value?


It just means that a variable is being assigned a string.

And what does postAction mean and do?


No way of knowing. it might be a function defined elsewhere in the page, or by an included script. It is not part of standard JavaScript or the DOM API.

Please note:i am using Structs framework


You must mean Struts. Please take more care when posting.




Thank you Bear, so json is simply taking a String, but what does json Object mean?
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSON
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic