i want to create a div with the id divNodes1 as a child of a div with the id mobileView.
i tried this:
alert("before");
var divNodesName = dojo.domConstruct.create("div",{ id: "divNodes1" }, "mobileView");
alert("after");
it fires the "before" alert and not the "after". no console output.
EDIT:
now i tried to create a div with dojo.create witch should look like this:
<div dojoType="dojox.mobile.ScrollableView" id="divNodes1" scrollDir="v" style="background-color: #d0d0d0;">
<h1 dojoType="dojox.mobile.Heading" id="h1Nodes1" back="zurück" moveTo="divNodes0" fixed="top" label="overview"></h1>
<ul id="ulNodes1" dojoType="dojox.mobile.RoundRectList"></ul>
</div>
first of all i tried to construct the div as a child of the div "mobileView" with following command:
var mobileView = document.getElementById("mobileView");
var mainNodeDiv = dojo.create("div",{ id: "divNodes1" },mobileView,"first");
but when i am linking at diveNodes1 it doesnt find the div
EDIT2:
Now i tried this (without sucess):
var mobileView = document.getElementById("mobileView");
var mainNodeDiv = document.createElement("div");
mainNodeDiv.setAttribute("dojoType","dojox.mobile.ScrollableView");
mainNodeDiv.setAttribute("id","divNodes1");
//mainNodeDiv.setAttribute("scrollDir","v");
//mainNodeDiv.setAttribute("style","background-color: #d0d0d0");
//mobileView.appendChild(mainNodeDiv);