function ResetContent(){
dijit.byId("DijitID").refresh();
}Can you provide more code for context? I will try to help.
<div dojoType="dijit.layout.ContentPane" title="Biotics Data Subset" id="DijitID1"> <span style="padding:10px 0;">Select REACCH Data to view information</span> <div id="toggle" name= "formName2" style="padding: 2px 2px;"> <form name="formName2"> Select Biotics Layer: <br> <select name="options1e" id= "options1e" onChange="updatefields1(this.selectedIndex)"> <option selected>Select Layer</option> <option value="Earthworm">Earthworm</option> <option value="Hessian Fly">Hessian Fly</option> <option value="Pan Trap">Pan Trap</option> <option value="RLN">RLN</option> <option value="Seed">Seed</option> <option value="Suction Trap">Suction Trap</option> <option value="Sweep Net">Sweep Net</option> <option value="Wireworm">Wireworm</option> </select><br> Select Field: <br> <select name="options2e" id="options2e" > onClick="alert(this.options[this.options.selectedIndex].value)"> </select><br> Field is less than, greater than, or equal to: <select id="options3e" > <option value="Less Than">Less Than</option> <option value="Greater Than">Greater Than</option> <option value="Equal To">Equal To</option> </select><br> Enter Quantity:<br> <input type="text" name="Quantity" id= "options4e" ><br> <br> <button dojoType="dijit.form.Button" onClick="executeGP();">Extract Data</button> </form>
function onTaskResultComplete(paramResult) {
var featureSet = paramResult.value.url;
dijit.byId("DijitID1").setContent(
"Biotics Layer: "+bioticsLayer+"<br>"+
"Biotics Field: "+bioticsField+" is "+sign+" "+quantity+"<br>"+
"<br><a href=" + featureSet + ">Click here to download the data</a><br><br>"+
'<form><button dojoType="dijit.form.Button" onClick="ResetContent()">Refresh</button><br></form>'); function ResetContent(){
dijit.byId('DijitID1').refresh();
Thank you for the update!
Take a look at this:
http://strickspage.com/extending-dijit-dialog-with-a-templated-widget-containing-widgets/
Your error might have to do with parseOnLoad (or rather, when the parsing is done).
If this post does not help, I would need to see more code; I don't see the source of your error in the code you've provided.
dijit.byId('myContnetPane').set('content', 'THE ORGINAL MARKUP') like you did on your gp result.
The refresh() method reloads the "href" property of the content pane. In your example you do not have the "href" property set so it loads the base url of the application.
To reset the content you need to usedijit.byId('myContnetPane').set('content', 'THE ORGINAL MARKUP')like you did on your gp result.
function reset() {
cp = dijit.byId('myContentPane')
cp.set('href', 'form.html');
cp.refresh(); //may or may not need to refresh
}No problem Peter.
Can you post the function that initializes and parses the document template? Also, post the BorderContainer that wraps your main ContentPane(s).
You could always try to replicate the issue in a http://jsfiddle.net/ and paste that link.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7,IE=9" />
<!--The viewport meta tag is used to improve the presentation and behavior of the samples
on iOS devices-->
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>Updating the legend to display visible layers</title>
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.2/js/esri/css/esri.css" />
<style>
html, body { height: 98%; width: 98%; margin: 0; padding: 5px; }
#rightPane{
width:30%;
}
#legendPane{
border: solid #97DCF2 1px;
}
</style>
<script type="text/javascript">var djConfig = {parseOnLoad: true};</script>
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.2"></script>
<script type="text/javascript">
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.AccordionContainer");
dojo.require("esri.map");
dojo.require("esri.dijit.Legend");
dojo.require("esri.arcgis.utils");
dojo.require("dijit.form.CheckBox");
dojo.require("esri.dijit.OverviewMap");
dojo.require("esri.dijit.Popup");<body class="claro"> <div id="content" dojotype="dijit.layout.BorderContainer" design="headline" gutters="true" style="width: 100%; height: 100%; margin: 0;"> <div id="rightPane" dojotype="dijit.layout.ContentPane" region="right"> <div dojoType="dijit.layout.AccordionContainer">