aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes hardcoding in javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "hardcoding in javascript" Watch "hardcoding in javascript" New topic
Author

hardcoding in javascript

ramesh maredu
Ranch Hand

Joined: Mar 15, 2008
Posts: 210

Hi,

In our application we use json to carry data from server, ajax calls are made using jquery, the json response is used to construct html dynamically.

The rendering logic varies according to attributes in json response, for example



I would like to know is there any elegant way there, not to hard code in java script, I mean can I read values 1 and 2 dynamically and use them in comparison.

SCJP 1.5 94%.
The greatest glory in living lies not in never falling, but in rising every time we fall.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
A switch statement




A look up way




Eric



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hardcoding in javascript
 
Similar Threads
Ajax with Database
How to access the JSON reponse from a java client
Filling a table with ajax response
JSON, dynamically formatting, etc.
[JAVA] Endoding an InputStream