Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need help, I have a website developed using Argis Server 9.3 and Visual Studio 2008. The map is inside the website via an iframe and it receives the input to be used in a custom query via javascript, this is working fine, except that, the users still have to clic the button of the QueryAttributesTask component to execute the query task. Does anyone knows how can I call the button clic code from another button (like an asp button)?

Any ideas on how to accomplish this?

share|improve this question
up vote 0 down vote accepted

You might be able to use the contentWindow property to access the execute query button in the iframe and simulate a click using the .click() method.

var childWindow =  document.getElementById("iframeMap").contentWindow; 

Keep in mind your iframe must be on the same domain for the browser to allow scripting between the parent and child windows. See Same Origin Policy. Also, this approach is not cross-browser, so this may not work depending on your environment.

share|improve this answer
I'll try this. Thanks. – eiefai Dec 15 '10 at 16:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.