I have a search page that uses jQuery to populate a table with search results. Search.aspx is the main page and the data is added from SearchAdd.ascx.
I decided to recreate my project and so I manually copied everything from one project to the other. Everything works and looks the same in both projects except for this thing. When I've done a search, browsed to a search result and then hit the back button in the browser, I don't get the previous search results any more.
So my question is, what do I look for?
I've checked that these are exactly the same on both projects:
viestatemode="Enabled"
jQuery scripts
global.asax
web.config
What else is there to look for? Could have anything to do with the virtual directory?
Any help is appreciated.
browser back button has nothing to do with what you have tested for. it is simply client side. it shows the thing from the browser's history, unless you have not altered the behaviour of the back button.
It had to do with the jQuery version.
In my old project I used jquery-1.4.4.min.js and in the new I used jquery-1.5.1.min.js. Switched back and the history is kept when hitting the back button.
I don't know why though?
Related
Have been bashing my head against the wall for a good day and a half now. Did everyone abandon old fashioned page structures to go to jQuery Mobile?
I have a webpage, tracks legislation. Main navbar goes as such:
/bills/list, /legislators/list, /committees/list
Where each link is rewritten into
index.php?category=$1&detail=$2
so /bills/list translates to
index.php?category=bills&detail=list
But when I load a page from the navbar, using an a href tag, the pages load all nice and easy using the AJAX loader, but the newly loaded pages 1. don't run scripts, and 2. don't display any formatting. This is a problem.
All the suggestions I have seen say to .bind something or .refresh or .trigger without any context of where that goes, and everything I have tried in that vein has frustrated me to no end.
Please help! And by the way, if I just data-ajax=false everything it works perfectly. But I want the quick loading that ajax gives! I just don't understand how it works and there are really no good pointers on the web I could find.
Code in this pastebin: http://pastebin.com/9jMxV0B6
You can see some artifacts of my struggling to get the thing working.
From what I gather, you shouldn't call new pages via a href, but then why the hell does jqm use href's for its nav menu? Is that supposed to call a function or something?
"But when I load a page from the navbar, using a basic old fashioned a href tag, the pages load all nice and easy using the AJAX loader, but the newly loaded pages 1. don't run scripts, and 2. don't display any formatting. This is a problem."
That happens because JQM ignores all the headers in all other pages besides the first page that loads. So if you want to do any changes to the page use page events, place them In first page.
I had problems understanding it also. Here is a link to my previous post that explains it a bit: How do I enable onload in jQuery mobile (open page both from link & load)?
Hope it clears some things for you. My recommendation for you is to do two simple pages and test simple URL functionality.
I am working on learning Orchard. I have got my development machine in a state where it will not load the home page. I get a 404 error with this message...
Server Error in '/OrchardLocal' Application 404
I realized that it is because no content item is set as the home page. However, the checkbox for making a page (or anything else) the home page is not showing in the edit page screen.
How do I fix this? I need the Make this a Home page checkbox back or some other way to accomplish the same thing.
Is there a way to do this in the database directly (which I realize is a hack but might let me move the ball forward on the problem).
I thought I would mention the EXACT exception thrown by the error is "The controller for path '/OrchardLocal/' was not found or does not implement IController."
Any help is appreciated. If I can't figure this out it seems I will be back to doing Orchard from scratch (new pull, new db etc) which seems to happen EVERY time I try to learn Orchard.
Here are the Parts I have on the Page Content Type. This is probably not the default list because I have been messing with it to get it fixed.
Common
Publish Later
Title
Autoroute
Body
Containable
Navigation
Identity
Menu
For the record I added the blog Module to the site and added a blog. But same behavior when I create a blog...no Make this the Home page and no way to set the permalink.
Do you have the AutoRoute Part attached to the Page Content type.
Check to make sure that your User has the permissions to set a content item as the homepage
To set an item as a homepage just set its permalink to an empty string.
I wanna have a dropdown menu like this link: http://datatables.net/release-datatables/examples/basic_init/table_sorting.html
(The one that are right below "Live example" line);
I haven't got many experience of working with jQuery UI, and I guess that result is produced by using it. Could you suggest me a way to create that dropdown.
Thank you.
P/S: that may be ok if it is not using jQuery UI (it's just my guess)
That solution doesn't appear too complex - they've got all the data already, and they're just hiding rows depending on what's selected.
On the other hand, as that's an open source project, you could just download it or use the hosted versions and integrate it on your site, which is probably easier than rolling your own solution.
Ok, got it. This is just default style in Firefox (There's no style applying for it yet). I got this misunderstand due to changing browser.
My JQM app has a page in it called "settings" which has three buttons serving as links to other pages. One of those pages is called "tracks" and the code for it is below.
Control your relaxation resources
When I click this button I get a "File not found" error and the browser is pointing to the "file:///C:/inetpub/wwwroot/SITES/jQuery%20Mobile%20Form/tracks#tracks" url rather than the "file:///C:/inetpub/wwwroot/SITES/jQuery%20Mobile%20Form/index.html#tracks" url. I'm using FF but it happens in all browsers and it also happens when running on the test website.
The navigation works for the other two buttons on the page.
The behavior occurs regardless of what name I give the page.
I know I've seen this problem discussed but can't find the answer to it, so my apologies in advance it this is a duplicate or triplicate.
Can anyone point me in the right direction?
Updating to beta 2 of JQM took care of this problem. Don't know why but it is resolved now.
I am using version 14.67.9 of TembeddedWB in a project in delphi 2007. I use TembeddedWB in combination with loadfromstring. That all works like I want it to but when clicking on a link in the page it goes to a page I am not expecting. If for instance the page is on a particular IMDB result site and one clicks on the link the browser goes to about:/title/tt1041829/. I guess I forgot to set some extra property or I am doing something else wrong. If somebody here can point me in the right way i would appreciate that.
It looks like the browser's current URL is not updated and the default "about:blank" is used. I guess this may happen when you don't navigate to the web site directly by Navigate or Navigate2 method but load the HTML from a local file or stream.
Edit: I see, you are using LoadFromString which confirms that.
In that case, it should be possible to use OnBeforeNavigate2 event to fix the URL.
The problem is that the web page you are accessing uses relative links and the reference point that it would be relative too is your loadfromstring which loads through the "about:blank" page. Another way of fixing this would be to inject a <BASE href="http://www.originaldomain.com/originalpath"> tag in the HTML header (between the <HEAD> and </HEAD> tags) which points to the location the page was accessed from. This will tell the browser where relative tags start from and will fix the problem without requiring inspection of every link.