What I am getting:
“<meta http-equiv=\“Content-Type\” content=\“text/html; charset=utf-8\”/>Create Map<link target=\”_BLANK\" rel=\“stylesheet\” type=\“text/css\” href=\“http://serverapi.arcgisonline.com/jsapi/arcgis/1.3/js/dojo/dijit/themes/tundra/tundra.css\\”><script type=\“text/javascript\”>djConfig = { parseOnLoad:true }<script type=\“text/javascript\” src=\“http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.3\\”><script type=\“text/javascript\”>dojo.require(\“esri.map\”);dojo.require(\“esri.toolbars.navigation\”);dojo.require(\“esri.toolbars.draw\”);dojo.require(\“dijit.form.Button\”);dojo.require(\“dijit.Toolbar\”);function init() {var map = new esri.Map(\“map\”);var tiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer(\“http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer\\”);map.addLayer(tiledMapServiceLayer);}dojo.addOnLoad(init);<div id=\“map\” style=\“width:900px; height:600px; border:1px solid #000;\”><a target=\“_BLANK\” href=\“http://www.bbc.co.uk\”>BBC"
The problem are the escape characters being added to this string variable won’t execute in the HTML_AREA field. Is there any way around this? Is there a way to have the variable only take in the actual string value without the escape characters?
i forgot to add, that this code seems to work if opened in a new dialogue, however, I don’t want to have to open a new window for something like this to function.
Thanks for the reply. The html seems to work when I open a new dialogue, but doesn’t seem to work when it is opened as a dialogue that has been opened to mimic a wizard. I am not sure if there is a difference with the way servoy repaints the html area after it has been populated if it is opened in a new dialogue or if it has been populated in the dialogue wizard at a later state.
And I just can’t figure out why it won’t display unless a new dialogue is created? are there other events for painting/rendering etc that need to invoked for this html_area to handle the html correctly. I will have to add that the *BBC* does show up. Are there issues with utilizing div tags within the html_area?
I have been able to get around this issue and display in the html_area by calling controller.show after the html_area /markup has been set.
The problem I am running into with this is that it is resetting the main dialogue to only display this child form and removing the parent form buttons in the main dialogue.
Is there any other method that would do what controller.show would do, without resetting the parent dialogue display/layout?
I’ve come accross ```
currentcontroller.show(forms.mm_map_lines);
I've narrowed it down to the line:
\
This line does not seem to work unless the form repaints itself. Any ideas on what I am doing wrong?
I have also opened the mm_map_lines form in its own dialogue and added a button to load the html when the user clicks the button but the problem still exists. Are there any other methods I can invoke to repaint this form?
I am also getting this error in the error console:
> Error: uncaught exception: [Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)" location: "http://localhost:8080/servoy-webclient/resources/wicketajax/wicket-ajax.js Line: 632"]
Dojo is a shitty js lib if you ask me, because if i am right dojo doesnt allow itself to be loaded inside an ajax request…
Thats why it works if you set it as a main form first because then dojo is initialized in a normal browser request
But if you do it by adding a tab through ajax (or something like that) dojo will not work because of the stupid design of dojo itself.
So if you want this to work i think your mainpage already have to have dojo included so that it is already initialized
and then later on you can reuse it in a tab.
I see what you are saying, and it is starting to make more sense as to why the esri maps don’t load, and that would probably be because they utilize dojo.
Now can I ask how do i go about loading dojo the way you have explained?
<link target="_BLANK" rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/1.3/js/dojo/dijit/themes/tundra/tundra.css">\
<script type="text/javascript">djConfig = { parseOnLoad:true }</script>\
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.3"></script>\
\
<script type="text/javascript">\
dojo.require("esri.map");\
dojo.require("esri.toolbars.navigation");\
dojo.require("esri.toolbars.draw");\
dojo.require("dijit.form.Button");\
dojo.require("dijit.Toolbar");\
\
function init() {\
var map = new esri.Map("map");\
var tiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer");\
map.addLayer(tiledMapServiceLayer);\
}\
\
dojo.addOnLoad(init);\
\
</script>\
</head
that has to be done in the Main page itself.
The usage of that stuff can then be done in another form.
I think that last init() can maybe be moved to the tab form also so this part:
function init() {\
var map = new esri.Map("map");\
var tiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer");\
map.addLayer(tiledMapServiceLayer);\
}\
\
dojo.addOnLoad(init);\
HI,
thanks for the reply. and all of your help. I gave up on that for now, but will revisit the issue at a later date. I just can’t seem to understand what it is that is causing this problem. If anyone has any ideas on how to solve this please feel free to post your solution. Thanks