MVC3 Web site displays (razor ) views normally in most cases but when browsing to some views the complete web page ( header to footer ) is displayed twice in the same browser window one page on top of the other. And then nothing on either page works correctly.
Has anyone seen this strange behavior in MVC3 razor before? What could cause this behavior?
Orgbrat
Use F12 developer tools to debug this. Compare IE/FF/Chrome. I've found some anomalies in IE9/CSS - mostly missing elements or a few elements duplicated. I have never heard of entire pages being duplicated. FF/Chrome didn't show the missing/duplicate element behavior. If you can come up with a small repro in IE9 (that renders correctly in FF/Chrome), send it to me and I'll forward it to the IE team.
Related
I have come across an issue when I add a TWebBrowser to a Delphi form and then load a webpage either from file, i.e. wb1.Navigate('file://myhtml.html'); or navigate to the exact page stored on a website, i.e. wb1.navigate('http://mysite/myhtml.html');
It seems to process the CSS differently whether I load the page locally or from the website in IE itself!
I have made sure the page has <!DOCTYPE html> which is meant to force IE9 as a minimum from what I have read.
Anyone seen anything like this before?
This is what it looks like if I load the page using TWebBrowser:
In IE, it displays the data correctly side by side horizontally.
Thanks. It was the compatibility mode that was the issue.
I have a strange problem in a web-app (using jQuery 1.10.2 and jQuery UI 1.10.3: the tabs (of the Tabs-plugin) are SOMETIMES rendered correctly and SOMETIMES not. "incorrect" means that the divs with the tab-contents are shown one below the other, no
That happens with IE7,8,10 and FF26 and on machines with rigid policies as well as those with more relaxed policy.
The browser may show a page incorrectly and then you just press F5 and the reload renders correctly.
Has anyone else had similar problems before? I have no idea how to approach this thing, yet the project-mgr wants to see something happening...
(I have validated the HTML/JS using CSE HTMLValidator and it did not report issues, also the JS console does not show any errors, but reports a few warnings (like 'Expected declaration, but found '*' for CSS-declaration like '*cursor: hand;' etc., but nothing related to the stuff I do)
How are you loading the tab content? Is it in the page when it's downloaded, or are they loaded via Ajax?
If already present in the document, you should try hiding (display: none) the content div's - that way you won't see them all if the tab initialization fails (which is likely what is happening intermittently).
This sounds like it could be a timing issue - where are the tabs initialized? Make sure you have them in the document.ready function so you are sure jQuery and jQuery UI are fully loaded first.
After a failure you could try manually initializing the tabs from the console - the result (success or failure) should give some additional insight.
Also use Firebug to examine the content divs to see if they are getting changed by the tab initialization - there should be classes added.
This is my first question on SO so i'll try and make it as clear and as understandable as possible.
I've recently started messing around with Angular JS and currently I am working on a mobile app using Angular JS and jQuery Mobile. So far I've not had any major problems and so far have no had a need to consider any external libraries for integration (such as the angular js + jquery mobile adapter). I've created a multi-page app (currently only two pages) and used separate controllers for each page (login + content page). The app itself is simple, it's just a list keeping app and i've created a quick jsfiddle based on the ui aspect of the content page: http://jsfiddle.net/G7JNV/4/
The app works as expected from the jsfiddle. However because the content page is a page in the same html document (index.html) as the login page, to navigate to the content page the url becomes:
.../index.html#mainpage
(mainpage being the page for the list keeper)
Thats when things start getting funny. When the url is like above, when adding an item to the list, the item is initially unstyled (it doesn't look like it's part of the list) but the css styling for that item comes back after adding another item. Of course the next item is then unstyled (and so on).
If you want to see what the issue looks like:
Everything however works fine if i don't have the hash page as part of the URL (I tested this by turning the two page app into just one page for the content so that .../index.html goes straight to the content page). The css is applied to the dynamic content fine as one would expect.
Of course I have no idea why it's doing this and I suspect that it's something to do with how angular and jqm treat the hash anchor in the URL (but bare in mind I don't have much experience in both Angular JS nor jQuery Mobile).
Any help from any of the more experienced Angular JS (and jQuery Mobile) users would be greatly appreciated!
You should be creating a directive that encapsulates the list and the logic that you have for it.
As suggested in the comments to your questions, a timeout can work. If you're having issues with the element "flashing" or "flickering", you can use the ngCloak directive to deal with this.
You may also want to check out the $locationProvider configuration in your app and turn off HTML5 mode or set the hash prefix.
If one uses remoteFunction or one of the the Grails Ajax capabilities, rendering a template to update a portion of a page, how does one see any additions made to the Javascript functions associated with the resulting page in Chrome or Firefox?
In Chrome, one is able to see the updated page/DOM via going to their Tools -> Developer Tools menu item, then selecting "Elements". There, I'm able to use the magnifying glass to select a portion of the updated page that I want to see. But, how do I also see the additional Javascript functions added to the page.
NOTE: Originally this question requested to see both html element content and Javascript content. Karthick AK's answer handles both.
In Chrome->Developer tool-> Network tab,
For each request being sent the response obtained can be seen in the Response tab. The rendered content can be seen in here.
Similiar option exists for firefox/firebug.
Another ajax gotcha i have experienced is, sometimes the ajax requests are cached and hence onclick the content is served from the cache and not an actual requests hits the server. This is more prominant in Old IE browsers
I have an Asp.Net MVC page that links out to a Asp.net web form with a report viewer control on it. The web form opens in a new window, and displays a report properly when clicking on the link on my MVC page. However when I close the my broswer window while the report is processing, and try to open it again, the page hangs and eventually gives me a page can not be displayed error.
Thoughts?
Initial thoughts from me are;
1) Not closing objects correctly on errors which might happen when browser windows are closed unexpectadly.
2) Report still running and not allowing another instance. easy to prove. when you get the error, close the window and click the report again. if you get your report then this may be a candidate.
3) Caching issues. try setting IE to refresh on every visit.
I think 1 or 2 are likely as I've seen this before on one of my applications where processing was interuppted.