question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Redirection Issue

See original GitHub issue

Hi all. @nolimits4web

We have 3 pages,

1.Index.html - Login Form 2.Content.html
3.Details.html

I am new to Framework7 .

I have used default form (ajax-submit) in Framework7. In ajax success function , i have redirected index page to Content.html using appView.router.loadPage(redirectURL); It works fine but the problem happened on Details.html , If we click back button on Details.html it goes to Content.html Correctly but in javascript it trigger as index.html

I have removed Navigation bar and Sidebar in index.html using

$$(document).on(‘pageInit’, function (e) {

    var page = e.detail.page; 

    if (page.name === 'index') { 

})

But it will trigger on Content.html page,

I think redirect was not working properly. Please tell me how to handle these types of issue.

FYI:

Form Submit Code:

                    $$('form.ajax-submit').on('submitted', function (e) { 
        var xhr = e.detail.xhr;  
        var json = e.detail.data;   
        var jsonParse = JSON.parse(json); 
        if(jsonParse!='false') 
        {    
            appView.router.loadPage('contents.html'); 
                    }
                    })

Thanks in advance

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nolimits4webcommented, Dec 7, 2015

I think what you mean, that when you go back from Details to Content you see pageInit event for Index page? This is correct, because F7 preloads index page when you to Content page which is already initialized and pageInit event won’t be triggered for it. Use pageBeforeAnimation callback instead if you need to track when you go back from Details to Content

0reactions
lock[bot]commented, Jun 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix website redirection issues on Windows
Right-click the web browser (Google Chrome, Mozilla Firefox or Microsoft Edge) shortcut on your desktop. Choose Properties. Click Shortcut tab.
Read more >
How to Identify & Fix 5 Common Redirect Issues
How to Identify & Fix 5 Common Redirect Issues · Incorrect Use of the Canonical Tag · Infinite Redirects · Multiple Redirects ·...
Read more >
How to fix page has links to redirect issue - Sitechecker
Redirect links are supposed to inform the visitors that the URL doesn't exist and lead them to the page's new location. When the...
Read more >
The Ultimate Guide to Redirects: URL Redirections Explained
Redirects send users & search engines from one URL to another. ... To fix the issue, redirect straight from URL A to URL...
Read more >
How to fix domain/ website redirect - Quttera
My domain is redirected to another URL/site/server how to fix it? Introduction. Redirection from one URL to another may be implemented in several...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found