Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window.location.href not working #3639

Closed
longxianlin opened this issue Jul 4, 2015 · 14 comments
Closed

window.location.href not working #3639

longxianlin opened this issue Jul 4, 2015 · 14 comments
Labels

Comments

@longxianlin
Copy link

no document tell us how to jump to another html file.

a tag is ok.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@yunqingmo
Copy link

Thanks, the problem has been solved.

@Egnus
Copy link

Egnus commented Jul 7, 2015

not for me, this is esentially what i was looking for on internet these days.
Is it written in the wiki already? how do i change html file within the same nwjs context? location.href will not work at all if i have binary code.

@joshterrill
Copy link
Contributor

location = "file.html"

@Egnus
Copy link

Egnus commented Jul 8, 2015

same problem, it is based in DOM level, not node level.
require('nw.gui').Window.get().evalNWBin(null, 'binary.bin'); wont work after the load, either a previous load of it and calling its functions.

@Egnus
Copy link

Egnus commented Jul 10, 2015

I finally found what it is causing binary code to stop working. Is a problem when devtools is opened and you change, reload, refresh or redirect the window.
#3388

@joshterrill
Copy link
Contributor

Were you redirecting to a domain that wasn't local or on the domain your app runs on? Just curious.

@Egnus
Copy link

Egnus commented Jul 10, 2015

Login.html to index.html via javascript after some conditions have been
met. Everything in local of course. Now everything work as usual without
problem with binary functions. No matter how u load the new page, location,
windows open... As long u close devtools before load it.
El 10/07/2015 22:07, "Joshua Terrill" notifications@github.com escribió:

Were you redirecting to a domain that wasn't local or on the domain your
app runs on? Just curious.


Reply to this email directly or view it on GitHub
#3639 (comment).

@joshterrill
Copy link
Contributor

I wonder if that's related to the issue I was having with trying to do a window.location.... I couldn't get it to work so opted to do Window.open() instead. Come to think of it, devtools was always open. I'll report back what I find.

@RIAEvangelist
Copy link

have you tried

document.location.href='app://index.html'

@joshterrill
Copy link
Contributor

Yes, but as @legionsra has said, it doesn't work if you have dev tools open.

@creativefull
Copy link

i have same problem :(

@Christywl
Copy link
Contributor

window.location.href works fine for me on nwjs-sdk-v0.25.0. Please try the latest nwjs build.

@creativefull
Copy link

wow :O thanks for your info @Christywl 👍

@Christywl
Copy link
Contributor

close until there is more information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants