Index: src/hg/hgTracks/hgTracks.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/hgTracks/hgTracks.c,v
retrieving revision 1.1638
retrieving revision 1.1639
diff -b -B -U 4 -r1.1638 -r1.1639
--- src/hg/hgTracks/hgTracks.c	8 Apr 2010 22:31:33 -0000	1.1638
+++ src/hg/hgTracks/hgTracks.c	9 Apr 2010 00:15:12 -0000	1.1639
@@ -4160,8 +4160,9 @@
 #endif
 
 void printTrackInitJavascript(struct track *trackList)
 {
+hPrintf("<input type='hidden' id='%s' name='%s' value=''>\n", hgtJsCommand, hgtJsCommand);
 hPrintf("<script type='text/javascript'>\n");
 hPrintf( "function hgTracksInitTracks()\n{\n");
 
 struct track *track;
@@ -4272,8 +4273,16 @@
         insideWidth = tl.picWidth-gfxBorder-insideX;
         }
     #endif//def IMAGEv2_DRAG_SCROLL
     }
+
+char *jsCommand = cartCgiUsualString(cart, hgtJsCommand, "");
+if (!isEmpty(jsCommand))
+   {
+   cartRemove(cart, hgtJsCommand);
+   uglyf("Hello javascript world! Your command is '%s'<BR>\n ", jsCommand);
+   }
+
 /* Tell tracks to load their items. */
 for (track = trackList; track != NULL; track = track->next)
     {
     /* adjust track visibility based on supertrack just before load loop */

