ASP innerhtml?

Results 1 to 3 of 3

Thread: ASP innerhtml?

  1. #1
    Join Date
    Dec 1969

    Default ASP innerhtml?

    I have a need to refresh some text on the screen depending on what is selected from a selection box. Seems like if I create a span and then somehow populate the innerHTML of the span onChange of the select box it would work, may not be the best way.<BR><BR>Anyway to further complicate things I would like to take the value from the select box and lookup another value that will be placed in the span.<BR><BR>The select box has categories of software<BR>when a category is selected I want to write to a particular place on the screen the name of the person responsible for that software. The person is determined by SQL server lookup on the software with the name of the person returned.<BR><BR>spawn exit<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: ASP innerhtml?

    ASP runs on the server. It outputs text (or, sometimes, binary information). It has no access to the DOM because the DOM doesn&#039;t exist at this point. ASP has no knowledge of whether it&#039;s outputting a HTML page (in which the DOM exists), or an XML file, or whatever.<BR><BR>You have two options.<BR>1) Submit the form when the form element changes, and use ASP to do the db lookup and output static HTML<BR>2) Store all possible lookup values in a JS array when the page loads, and do a lookup in that in the onChange.<BR><BR>Craig.

  3. #3
    Join Date
    Dec 1969

    Default another way (dhtml).

    if you use an iFrame and not span you can refresh the page in the iframe and to send the data you want to the asp page...<BR>it will look like this:<BR>- onchange="showInfo(this.value)" --&#062; this goes to the select box.<BR>- the function:<BR>function showInfo(sVal){<BR> document.frames[frameIndex].src = "showInfo.asp?eID=" + sVal;<BR>}<BR><BR>this should work fine.. not sure about the syntax but it&#039;s something like this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts