Durandal 2.0 Modal using IFrame to display HTML file content - iframe

I am currently using Durandal 2.0 to produce a modal dialog box to display an HTML file. I am successfully doing it using IFRAME tag. Its needed for the application. SSRS produces these files daily and the user needs to see the content of these files on an intranet app. I was wondering is there a more preferred way of displaying the content of an external HTML file other than using IFRAME tags or is IFRAME tags are still the preferred way?
Thanks in advance for the answers.

If your HTML views has nothing to do with your view models then I think there is no point of making that HTML files to a Durandal view.
Because the actions/navigations happening in those HTML files are independent from your Durandal application it is better to use an IFrame.

Related

Create a template page for html that can be used on every page

I would like to build the equivalent of a _layouts.cshtml page that I can use with every page in my web app. I don't want to use cshtml or razor though I want to use html. Is there a simple way to convert the _layouts page to standard html and then include it with the other pages in the app?
I have inherited an app that uses cshtml, with a _layouts page for menus and some content styling used on each page. I can duplicate the content on every page, but would prefer to have a generic solution for it. The client does not want to use cshtml pages. Any java library, such as AngularJS that would provide tools is ok for me to use. I'm not a front-end guy and this is a relatively low budget operation where I'm working for free. TIA.
i'm not familiar with .cshtml but on an html page you could use an iframe and update the contents of the iframe with different pages as needed.
you could also get external html and put it on the current page using jquery's get().
// get the contents of 'test.html' and put it into the 'result' element
// on the current page.
$.get("ajax/test.html", function(data) {
$(".result" ).html( data );
alert("Load was performed.");
});

Kentico CSS issue

I am using Kentico and have noticed a weird css issue. After mocking my pages up in Dreamweaver I then create the page in Kentico, however I have noticed that some elements in Kentico are slightly misaligned.
I have tried copying the source from Kentico into Dreamweaver to see if I can fix the issue but Kentico still renders the content incorrectly.
Are you using Dreamweaver in design or split mode? if yes, turn it off and use code mode only.
I guess you have to compare structure of your HTML and Kentico output HTML. Kentico add a form tag by default which may cause structural issue with css. If you can provide both html, I can help
On Kentico (up to version 11) when you use portal engine or ASPX templates you have this shortcoming. Kentico adds excessive HTML markup on the controls it creates on order to provide hooks that will help the engine to perform actions. For example, Bizforms add multiple divs/spans around normal input tags. So, you have to adapt the CSS you have created to match the tags used by Kentico.
What is your template type:
ASPX page: You can copy your entire HTML code from Dreamweaver into your aspx page template and then work on your page.
Portal Page: You need to understand the structure and cannot replace entire HTML Code from Dreamweaver. You have to seperate your HTML code to insert DropZone for web parts and widgets.
Good Luck!
You will have to make some adaptation always from raw HTML and kentico. In your case you are using aspx model which makes it more harder as server level changes are not 100% compatible with raw HTML or client side code. If possible use portal engine with transformation which will be more like to like of raw HTML.
You must create a directory in CSS/Stylesheet
If you're using the CSS section of the Admin interface, check to see if you have any & signs at the beginning of any tags. Kentico doesn't seem to support this so might be breaking any classes that appear after it.

How to add background music in asp.net without bgsound and embed

How to add background music when a website loads for the first time without using embed and bgsound.I am using visual studio 2010 and these two are not supported in this.
I am developing website using master page and i want to use the code in master
page.
What is the best practice to to be able when I open my website and some music starts f sometime.I am not much expert in .net with c#.So finding some problem in it.
If browser also matters?
Regards,
suparna
Add the following code anywhere in the body of your HTML document to embed a music file and play it automatically when a visitor browses your website.
<audio src="music/yoursongname.mp3" autoplay="autoplay" loop="loop"></audio>
Change the "src" attribute so that it contains the path and filename of the music file that you want to embed.
Note: Add the "loop" attribute if you want the music file to play over and over

mx:HTML window - data scraping a php page?

I have a Flex mx:HTML component which uses an html window to display html data from 3rd party website.
let's call the page:
http://www.company.com/page.php (not a _real page (duh))
There is alot of "trash" displayed.
I used "Firebug" to inspect the webpage elements.
I see that the section of the page I want to display is:
/html/body/div[4]/div[2]/div/div[2]
or, to put it a another way:
html body.landing div#content-bg div#content-wrap div#content div.main
my question:
Is there a way to access this section of the page only, especially since it is "rendered" using PHP (which I have no knowledge or understanding of)?
(I will NOT be using PHP to gather this info)
many thanks!
Mark
Take a look to Flex IFrame which enables HTML Browsing in Flex apps.
You can try this URL.

CSS linked to aspx page is Not loading in Firefox

I am creating a aspx page using visual studio 2008.
and linking it with a css via
but when i build it page opens with only html format and CSS look and feel is not applying
Please tell what can i do to make to correct.
But its working correct on IE...
Have you tried validating the resulting HTML page and the CSS file (HTML Validator) (CSS Validator)
If validating and resolving errors does not help, please post your HTML and CSS.

Resources