언어 설정

Menu
Sites
Language
Change Page

Hi ,

I want to change active page using by tau.changePage(to) method. My script is working and it is not giving any error but it is not changing current page.

Can anybody help me?

 

Html

<a href="Currency.html" onclick="goToCurrency();">Currency</a>

Script

function goToCurrency() {      
    try {
        tau.changePage("Currency.html");
    
    } catch (e) {
        alert(e.message);
    }
}

Responses

1 댓글
Iqbal Hossain

Hi~

You can simply use href to navigate in tizen web app. 

Here is an example, 

First Page, index.html

<div data-role="page" class="ui-page" id="demo-page">
    <div class="ui-header" data-position="fixed">
		<h1>Page Example</h1>
	</div>
	<div class="ui-content">
		<ul class="ui-listview">
			<li class="ui-group-index">Navigation</li>
			<li class="ui-li-anchor"><a href="second.html">Go to Second Page</a></li>
		</ul>
	</div>
</div>

second.html,

<div data-role="page" class="ui-page" id="demo-page">
    <div class="ui-header" data-position="fixed">
		<h1>Second Page</h1>
	</div>
	<div class="ui-content">
		This is second.html
	</div>
</div>

Put second.html along with your index.html.. 

You can also put it on a folder. But in that case you have to add the path in href like this 

href="folderName/second.html">

And don't forget to add TAU libraries to both html page. 

Hope it will help you. 

Let me know that. 

-Thanks