Hi,
I have this document where I am displaying a pulldown list and a list of items with buttons that lead to detail pages.
I create a javascript function where the button go to this function and uses document.write to display the details.
but, I was wondering how to clear the screen and then write something on the screen from within the javascript fucntion.
below is my script: I want to clear the current screen after the button is clicked , keep my pull down list available but clear all old content and replace with new content. new content is the msxml object.
my pulldown list is just simple html.
Thanks,
Candy
<SCRIPT>
function showDetail(tip_id)
{
var display = document.list.display.value;
var detailXSL = new ActiveXObject("MSXML2.DOMDocument"
detailXSL.async=false;
detailXSL.load(display);
var nodes = tipsheetXML.selectSingleNode("tipsheets/tipsheet[@tip_id='" + tip_id + "']"
document.write(nodes.transformNode(detailXSL.documentElement));
}
</SCRIPT>
I have this document where I am displaying a pulldown list and a list of items with buttons that lead to detail pages.
I create a javascript function where the button go to this function and uses document.write to display the details.
but, I was wondering how to clear the screen and then write something on the screen from within the javascript fucntion.
below is my script: I want to clear the current screen after the button is clicked , keep my pull down list available but clear all old content and replace with new content. new content is the msxml object.
my pulldown list is just simple html.
Thanks,
Candy
<SCRIPT>
function showDetail(tip_id)
{
var display = document.list.display.value;
var detailXSL = new ActiveXObject("MSXML2.DOMDocument"
detailXSL.async=false;
detailXSL.load(display);
var nodes = tipsheetXML.selectSingleNode("tipsheets/tipsheet[@tip_id='" + tip_id + "']"
document.write(nodes.transformNode(detailXSL.documentElement));
}
</SCRIPT>