언어 설정

Menu
Sites
Language
how to write button touch event in TIZEN Basic web application development

Hi,

How to write the code for button touch event in TIZEN Basic web application development.I want to open a page on button touch event.How can i do it please help me.

 

 

Thanks and regards

Mohit Kumar

 

Responses

7 댓글
Marco Buettner

One more time... Read some JS tutorials and learn the fuckin' basic ...

Here you will find the answer to your question http://www.w3schools.com/jsref/event_onclick.asp
 

John Ixion

http://openclassrooms.com/courses/build-your-website-with-html5-and-css3

Palitsyna

Hi,

to open a new page you can use this code:

<div>
    <a href="secondPage.html">
        <button>Test2</button>
    </a>
</div>

 

Or you can handle click event:

document.getElementById('button').addEventListener("click", function() {
    window.location.href='secondPage.html';
});

 

colin Rao

Hi,

Tizen web app support the jQuery Mobile, aslo Samsung provide a UI app lib "tau" (Tizen Advance UI).

Suggest to use these lib's api, such as tau.changePage("newpage.html"), tau.back(), .etc.

AVSukhov

Hello,

For example you can create Multi-page app in IDE for different templates and and look into the implementation.

Vikram

Firstly, you can try to study the sample project in IDE, New > Tizen Web Project > Sample > Web App.

Button event handler is a very basic issues in any UI app dev. :)

Seoghyun Kang

Hello,

 

Firstly, you need to choice whether you use the jQuery Mobile or TAU(Tizen Advanced UI).

If you use the many graphics image or it is the game application, I recommand that you do not use the jQuery Mobile and TAU.

In this case, you just need to use the "<a>" tag.

ex) <a href="two.html">Two</a>

 

But if you create the normal application, I recommend that you use the jQuery Mobile or TAU.

In jQuery Mobile and TAU , you can create multiple pages in a single HTML file.

 

[jQuery Mobile]

<div data-role="page" id="one">
  <div data-role="main" class="ui-content">
    <a href="#two">Two</a>
  </div>
</div>

<div data-role="page" id="two">
  <div data-role="main" class="ui-content">
    <a href="#one">One</a>
  </div>
</div>

 

[TAU]

<script>
   tau.changePage("two.html");
</script>