-
Notifications
You must be signed in to change notification settings - Fork 30
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
programmatically call a changePage on a panel #2
Comments
Can you console.log( $("#main") ); to see whether you are really passing the object to pageContainer? I think the "#" is the problem, because pages have id and panels have data-id. This is not the same. I'm usually settings the panel to something like $('#myPage').closest('div:jqmData(role="panel")'), which then passes the correct object to the changepage. So in your case, either a) give the panel a classname and set: pageContainer: $('.classname') Both should work. Does this help? |
Thanks for your response! I have output $("#main") and it was taking ok because i added id="main" attributte to the panel... I have tried your option b but does not do the changepage correctly, here is the log : Do you have a working example? |
Ok. Tried it a few times. I can call the page allright programmatically, either by referencing a .class or #id, but after the transition the screen turns white. Try something like this:
Do you get the same? I think I still have an error in JQM's css3TransitionHandler, where active-page class gets dropped after transitions. It should not drop active page on the wrapper page, if you are calling programmatically... I thought I had an easy solution there. I will let you know once it's working. |
Hi, Yes, i have tried like this also and getting the same problem, the screen turns white... Thanks for trying! |
Hey epb, Figured it out. I'm actually blocking changePage calls on panel transitions, so... you can call whatever you want, it won't work :-) You need to call the panelTrans function inside the plugin like so:
The options are: It will need some fine tuning, but I will try to have it ready with the next commit. Regards, Frequent |
Hi, Thanks very much for your response, I have tried your solution but i can't get it working. My problem is that I want to reload one of the internal pages of the multiview, because I want to pass a new productId each team I am calling this page. Do you know the best way to do this? Should i load that page as external page inside the multiview? Thanks very much for your help!! |
Hi, Actually I'm just sitting over something similar, like you are doing... I'm also thinking about the best way to accomplish this. a) If you load the page externally into the panel and the user leaves again, the plugin should drop the page, so when the next item is loaded, the page will be loaded again. Nothing to do for you. b) If you have the productID page "on board" when the wrapper page loads you would have to load the productID related stuff when calling the page and remove them again when the user leaves the page. Without having tried, I would go for a). I will let you know how it turns out Regards |
Hi, Thanks very much for the effort and explanations! I have page1.cshtml and page2.cshtml that will be loaded as external page in the page1 menu panel. Inside page1 menu page, I have this link to load the external page: Inside page2 menu page, I have this link to go back to page1 menu page: I am doing something wrong? Any ideas? Thanks very much again |
I set up a sample page which breaks both ways I'm trying = using the panel-history or using the back button :-( I will try to fix it over the weekend along with the programmatic panelTransition call, so you can continue. Actually external page handling is pretty much the trickiest area in the plugin. In general: I will let you know how it turns out. |
@epb - new commit with JQM 1.0.1. coming up in which you can call changePage programmatically. Trying to upload tonight. |
new commit is done. You can now changepage programmatically by calling:
So. I'm closing this. |
Is it me or it dosent work with external pages? |
which version are you using? multiview-JQM 1.1? |
Here is a quick sample page. Click on the text in the left menu. This Check the source code on the bottom how it's done. I'm almost done with the JQM 1.1. version of multiview - please use the version from this folder: Also note, you will need to use the JQM version in this folder, because there are a few if-clauses I need to add inside JQM to make it work. Let me know if this helps. |
Hi,
It's not an issue, but i have tried to do a changePage programatically to a panel page and I can't get it work although it works for a link that includes data-target="main" :
{
pageContainer: $("#main"),
changeHash: true,
reverse: true,
transition: "flip"
});
Any suggestions?
Thanks in advance!!!
The text was updated successfully, but these errors were encountered: