[Thread Prev][Thread Next][Index]

[las_users] Re: Examples of Javascript Components v2.x


I'm following up on the message I sent yesterday. By making some changes in 
the HTML form that specifies the LAS request, I was able to get the "Molokai" 
example to work on my Armstrong server using version 1 of the Javascript 

For the sake of anyone else interested in making custom interfaces, here's 
what I did:

1. In the function submitXML(), change the var URL to point to your Armstrong 
LAS. You'll need to specify the servlet ProductServer.do instead of the older 
LAS script LASServer.pl

var URL = 'http://www.yourserver.org:8080/las/ProductServer.do?xml=' + 

2. In the function processChoices(), change the specified 'style' to something 
other than 'LAS6' so that the script generates XML using the Armstrong 
syntax. (I originally tried commenting out this line only to discover that if 
you omit it, the script assumes LAS6 behavior.)


Yesterday, I said:
> I briefly looked at the comment in the code which advised me to look at the
> naming of products in ui.xml. I'm assuming that is not the problem because
> LAS installation is "stock" and I have not modified the UI configuration.

Today I am eating those words because looking closely at my las.xml and ui.xml 
files revealed two changes I needed to make in the Molokai form.

3. In the function processChoices(), change the setVariable method to match 
the variable name as it is configured in your las.xml. For my "stock" 
Armstrong installation, it was coads_climatology_cdf instead of 


4. In the "Choose a product" section of the HTML input form, change the values 
of the two radio buttons to match the names of the operations on your LAS. On 
my Armstong server, the "line" operation goes by "Plot_1D." The "txt" 
operation is named "Data_Extract." 

<font size="+1">Choose a product:</font><br>
<input name="operation" value="Plot_1D" checked="checked" type="radio"> 
<input name="operation" value="Data_Extract" type="radio"> Table

With those changes in place, the form now successfully queries my Armstrong 
server. The finished example is online at:

I gotta hand it to the the LAS developers for including comments in their 
code. The information I needed *was* in there, but I had to re-read a number 
of times to find all the areas I needed to change. Examining the XML that was 
generated by the standard interface was also really helpful.

Anyway, I hope this information might be of some use to someone. Now that I 
have a working example, I'll be designing some simple forms to let middle 
school students query specific data sets.


Todd Viola
office: +1 361-749-2472

[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement