Called HTML does not inherit the CSS and JS of index.html

I am using Framework7 for my login. On my index.html I have the following code.

This will call the click.ebmi-home of my app.js

I were able to display the ebmi-home.html but the CSS and JS is not working. Please see the output.
login 003

How can I call the ebmi-home.html so that it can also use the CSS and JS used in index.html.

Huteng

ebmi-home.html, is part of your f7 app? if so, why you use window.location.href ? you should use f7 router to navigate into pages.
Also, just and advice, you are using jquery with dom7 at the same time. Do you need jquery to make something really specific? if you are using jquery just to handle clicks and make ajax call, you can doit with dom7, in that way your app will be lighter. Just an idea, i dont know the context.

2 Likes

Hi @pvtallulah,
ebmi-home.html, is part of your f7 app? Yes

if so, why you use window.location.href ? that is what i found on codesundar example for phonegap login. i am a beginner in framework7 :slight_smile:

you should use f7 router to navigate into pages.
Ok, I were able to add routes for ebmi-home.
index.html
ans 002
app.js
ans 001

Also, just and advice, you are using jquery with dom7 at the same time. Do you need jquery to make something really specific? if you are using jquery just to handle clicks and make ajax call, you can doit with dom7, in that way your app will be lighter. Just an idea, i dont know the context.
Here is the context, index.html is my login page,
ans 003
The user have to enter an account number. If the user click the Log-in button, I have to check the validity of the account number. That is the reason i have the following code in app,js:


If it is a valid account number then call the ebmi-home.html. I just don’t know on where and how am I going to call the /ebmi-home/ route if the account number is valid.

Thanks for entertaining my query. Thanks in advance.

1 Like

@pvtallulah, i were able to correct them using your help from other question Route page from login screen to first page not working. Thank you.

1 Like