当点击按钮时如何导航到dojox中的另一个页面

时间:2016-07-15 10:13:11

标签: dojo navigation ibm-mobilefirst

如果在工作灯中使用dojox点击dojox.mobile.Button,如何导航到其他页面。

我只想使用dojox.mobile.Button。任何人请帮助我如何做到这一点。

如何从第一页到第二页?

function dojoInit() {
require([ "dojox/form/DropDownSelect", "dijit/form/Select", "dojo/ready",
	"dojo/parser", "dojox/mobile", "dojo/dom", "dijit/registry",
	"dojox/mobile/ScrollableView", "dojox/mobile/View",
	"dojox/mobile/Overlay", "dojox/mobile/Heading",
	"dojox/mobile/TextArea", "dojox/mobile/SimpleDialog",
	"dojox/mobile/TextBox", "dojox/mobile/Button",
	"dojox/mobile/RadioButton", "dojox/mobile/Accordion", "dojox/mobile/GridLayout","dojo/parser",
	"dojox/mobile/ContentPane", "dojo/on", "dojo/domReady!" ], 
	
	function(ready) {
		ready(function() {}
	);
});
}
<div id="M_LanguageView" class="selectLang"
				data-dojo-type="dojox.mobile.View" data-dojo-props="selected:false">
				
				<img src="images/LanguageLogo.png" class="logo">
				<p>Select Your Language</p>
		
				<div align="center">
					<hr>
					<div>
						<form name="dojo" action="Login_en_View">
						<button id="M_LanguageView_en_Btn" class="selectLangbtn"
							data-dojo-type="dojox.mobile.Button" >
							<span class="btnlbl englishFont">ENGLISH</span> 
							<span class="lang_Indicationarrow"> </span>
						</button>
						</form>
					</div>
		
					<div>
						<button id="M_LanguageView_ar_Btn" class="selectLangbtn"
							data-dojo-type="dojox.mobile.Button">
							<span class="btnlbl arabicFont">العربية</span> 
							<span class="lang_Indicationarrow"> </span>
						</button>
					</div>
				</div>
		
			</div> 
			
			<div id="Login_en_View" class="qHeaderBg englishFont" data-dojo-type="dojox.mobile.View">
				
				<div data-dojo-type="dojox.mobile.ScrollableView" id="Login_en_View_Id"
					data-dojo-props="selected:false">
										
					<h1 id="Login_en_View_Header" data-dojo-type="dojox.mobile.Heading"
							data-dojo-props="fixed:'top'" style="background: rgba(255, 198, 0, 1.0);">
						<img src="images/Header_en.png" class="headerImgAlignment">
					</h1>
					
					<div id="Login_en_View_DivId">
				
						<div class="errorMsg englishFont" id="Login_en_View_Error"></div>
				
						<div class="successMsg englishFont" id="Login_en_View_Success"></div>
				
						<label id="Login_en_View_Mno_lbl">Mobile Number :</label> 
							<input id="Login_en_View_Mno_txt" class="clearFields englishFont"
								data-dojo-type="dojox.mobile.TextBox" onKeyDown="if(this.value.length==13 && event.keyCode != 8)return false;" type="number" min="0" inputmode="numeric" pattern="[0-9]*" title="Non-negative integral number"> 
						
						<label id="Login_en_View_Uc_lbl">Password Code :</label> 
							<input id="Login_en_View_Uc_txt" class="clearFields englishFont" data-dojo-type="dojox.mobile.TextBox"
								onKeyDown="if(this.value.length==8 && event.keyCode != 8)return false;" type="password" min="0" inputmode="numeric" pattern="[0-9]*" title="Non-negative integral number">  
							
						<button id="Login_en_View_Sub_Btn" data-dojo-type="dojox.mobile.Button" class="buttonProfile button englishFont">SUBMIT</button>
				
						<button id="Login_en_View_Reg_Btn" data-dojo-type="dojox.mobile.Button" class="buttonProfile button englishFont">REGISTER</button>
				
				        <button data-dojo-type="dojox.mobile.Button" id="Login_en_View_Ruc_Btn"  class="buttonProfile button englishFont marginBottom">RESED PASSWORD CODE</button>
					
					</div>
					
					<h2 id="Login_en_View_Footer" data-dojo-type="dojox.mobile.Heading"
						data-dojo-props="fixed:'bottom'">
						<img src="images/Back.png" class="footerImgAlignment"
								onclick="goBack()" id="backLang">
					</h2>
					
				</div>
			</div>

2 个答案:

答案 0 :(得分:0)

创建表单和提及操作属性值作为目标页面。

<form name="dojo" action="your_next_page">

<button></button>

</form>

答案 1 :(得分:0)

点击第一页上的按钮,使用如下。

var presentView = registry.byId("M_LanguageView");

presentView.performTransition("Login_en_View", direction ? direction : 1, "slide");