ios developer
ios developer

Reputation: 3473

Navigate one screen to other in PhoneGap

I want to navigate from one screen to other when i click the button.

I have few question regarding the application:

  1. Is it neccessary to create the .js file for every html file?
  2. Do we need to create only html or can able to make the application by creating only .js file?
  3. Is it possible to navigate from one screen to other by writing some javascript code in .html file?

Upvotes: 0

Views: 603

Answers (1)

user
user

Reputation: 1001

1)Is it neccessary to create the .js file for every html file?

ans 1 Its not necessary if you have the same functions for the rest of the pages. I have never tried it ..but logically it is correct.

2)Is it neccessary to create the html or can we run the application by creating only .js file?

ans 2 You have not understood the PhoneGap working concept... Your HTML and CSS is for the designing your application and your javascript /Jquery is for adding functionality

3)How should I navigate from one screen to other?

ans 3 that you can do it like this..

 <div id="xyz" class="your CSS"><img src="img/abc.png" onClick="test()"/></div>

 function test()
 {
     window.location.href="index.html";
 }

Upvotes: 1

Related Questions