Hi,
I am in the process of adding some preformed queries to MartView. The user will select from a list of queries, possibly enter some parameters (depending upon the query), and I have code (either perl or javascript) which will send the query to MartView using a Mart URL Request. This works fine for my first test query. This is implemented in javascript added to header.tt and footer.tt. My main problem is how best to find out using javascript what query was requested when I come back into the martview page (so I can reselect the user's canned query and re-enter the parameters). Can you suggest how I could do this, minimising the changes to the biomart code as far as possible? One idea I had is to handle the generation of the query URL from perl, and store the canned query somewhere (in a session parameter maybe). Then when I come back to the martview page, use an ajax request to find out the details of the canned query. This seems rather complicated, but could all be done without changing any biomart code, just adding javascript to header.tt, and some extra scripts on my server to handle the requests. But if you can suggest something better (simpler :-) ) I would be grateful. Also, do you have handy perl and/or javascript functions to convert between a query in xml format (for MartService) and URL format? It would be convenient to store the canned queries as xml templates (ready to fill in parameters), then convert the completed xml into a URL query. I guess I can write such a function if necessary, but don't want to re-invent the wheel. Regards, Roger
