first time poster here so I hope I am doing this correctly. I have been contracted by my church to redesign their website. (They've been dealing with a table layout for years.)
I am looking to display an RSS feed (with an audio file) on my website. I am unable to use PHP or any other server-side language, it has to be done in JavaScript.
Due to the way our hosting is set up, all images and xml files are hosted on
images.(mydomainname).com
and the page on which I looking to display the podcast is
(mydomainname).com/sermons
as such, I have run into the problem of being unable to access the xml file with JavaScript. For all the Googling I've done, it seems that my GoogleFu has failed me. Any tips would be greatly appreciated.
If you have the ability to drop another static file on your images domain, then I'd suggest EasyXDM. It's a cross-browser library which provides an a way to communicate (using only client script) between different domains. Caveat: you need to have control over both domains in order to make it work (where "control" means you can place static files on both of them).
Related
I am able to use the Cytoscape.js library to display a network graph on my own web browser. I wrote a HTML file containing the JavaScript code that takes in the graph JSON and style JSON files from my laptop and calls cytoscape(). When I run my HTML code on my laptop, the network graph is displayed on my own web browser and I can play with the graph.
Now I need to run the HTML code on our Linux server and then send a web link to the user, so that the user can click on that web link to view the displayed network graph on their own web browser, and the user should also be able to move nodes & edges around just as I did on my own web browser.
I am not a web developer so I am missing some very basic knowledge. I think I probably need to link the HTML code to a web domain (deploying the HTML code on a hosting server with domain name). I was just wondering if you could offer me some advice on how to do this?
Another question (which is more important) is: Assume I am able to link the HTML code to a web domain. When the user clicks on the web link to view the displayed network graph on their own web browser, is the user still able to move nodes & edges around?
The graph JSON and style JSON files and some additional JavaScript code the HTML loads in reside on our server. I am not sure if there are any issues about this when the user accesses the web link?
Any advice would be greatly appreciated.
Thank you very much in advance!
The question is too broad. You'd be best off searching for some books to read regarding web dev.
You might find using Github pages a bit easier than managing your own server, but you really should do some reading either way.
Basic resources to get started
https://developer.mozilla.org/en-US/docs/Web/Guide/Introduction_to_Web_development
https://developer.mozilla.org/en-US/docs/Learn/Server-side/First_steps/Introduction
As the title indicates i want to have a certain application get access to the local file system. To describe why i will illustrate my situation:
I am a running a IIS WebApplication with the C# MVC 4 Framework as backend module. The site solely consists of HTML, CSS markup and some JS. The page will be loaded in IE11+ (Edge) only. For the standard procedure of displaying and accessing data from as well as sending data to the server this works quite fine.
On a certain page I want the user to be able to upload a file using a simple file dialog, like the one you can initiate with a simple <input type="file"> tag. I also want to offer the posibility to download files from the server but need to know where files has been saved / will be saved to.
As described on a lot of different websites, just like this one here, the HTML5 File API does a great job but will not be able to return the full qualified filename including the local path directions, same for JS accessing the file object.
As my research confirmed HTML5, JS and also SWF (Flash) will not report detailed information because they are all sandboxed applications or restricted by RFCs. I already unterstood and appreciate the effort to secure my trips to internet.
But in this case do need the paths where a file was upload from and the file has been downloaded to.
So my question is, what is the best way to expose the full path directions for a up- as well as downloaded file to report them back to the server?
Is it possible to embed a SWF object inside HTML which will run inside an Adobe AIR sandbox or is a signed JAVA Applet still the one and only solution to accomblish this security breaking task?
A solution i would also apreciate would be the possiblity to ask the user to get access the file system, like you grant access to the web push service to receive notifications.
Also if there is a possible solution which may suite my circumstances please let me know by adding some simeple examples / revealing some factful links, thanks in advance.
I want to show website preview on a link similar to facebook when a user post a link. my question has been repeated in the following link ,but I am going to ask specific information throughout my solutions. I have 2 solutions for showing webpage preview which are as follows:1. server side html process 2. client side html process.
1. server-side html process
I used System.Net.WebClient().DownloadString(url) to retrieve the web page data in server side , and I tried to extract the most important information in the page ,but in most cases, main part of the page loads using javascript , therefore I do not have access to that information.
Another solution in server-side html process is to work with webBrowser and WebDocument objects. because I didn't work with these libraries and I don't know how much the Web server performance affect by applying this objects , I only present this solution for discussion .Therefore are there any server-side html graber which fetch all html data including javascript loaded html source?
2. Client Side Html process
The simplest approach for client side is to use the iframe tag, but it has two following problems:
a. I can not access to innerHTML of the frame for the links on other domains.
b. I can not load https webpages such as drop-box and facebook in the iframe
because of "x-frame options" error.
My question is that, is there any other client-side solution to retrieve dynamic html source(loaded by javascript) from 3rd party webpages (usually https)? Or can I solve above problems with some tricks.
I guess server side approach would be most viable option. On client side you can use proxy services which allow to solve cross domain limitation, for example, crossorigin.
To generate a preview, similar to one Facebook provides, you need to get Open Graph information for target page. Libraries to process open graph data available for multiple platforms. OpenGraph-Net could be used on .NET plarform.
I am quite new to web application development and I need to know how would I make other sites use it.
My webapp basically gets a username and returns some data from my DB. This should be visible from other websites.
My options are:
iframe. The websites owners embed an iframe and they pass the userid in the querystring. I render a webpage with the data and is shown inside the iframe.
pros: easy to do, working already.
cons: the websites wont know the data returned, and they may like to know it.
javascript & div. They paste a div and some javascript code in their websites and the div content is updated with the data retrieved by the small javascript.
pros: the webside would be able to get the data.
cons: I could mess up with their website and I don't know wow would I run the javascript code appart from being triggered by a document ready, but I wouldn't like to add jquery libraries to their sites.
There must be better ways to integrate web applications than what I'm thinking. Could someone give me some advice?
Thanks
Iframes cannot communicate with pages that are on a different domain. If you want to inject content into someone else's page and still be able to interact with that page you need to include (or append) a JavaScript tag (that points to your code) to the hosting page, then use JavaScript to write your content into the hosting page.
Context Framework contains embedded mode support, where page components can be injected to other pages via Javascript. It does depend on jQuery but it can always be used in noConflict-mode. At current release the embedded pages must be on same domain so that same-origin-policy is not violated.
In the next release, embedded mode can be extended to use JSONP which enables embedding pages everywhere.
If what you really want is to expose the data, but not the visual content, then I'd consider exposing your data via JSONP. There are caveats to this approach, but it could work for you. There was an answer here a couple of days ago about using a Web Service, but this won't work directly from the client because of the browser's Same Origin policy. It's a shame that the poster of that answer deleted it rather than leave it here as he inadvertently highlighted some of the misconceptions about how browsers access remote content.
I there anyway that I can install a SharePoint web application not on the root I need it on a virtual path? I have a situation that my customer is using somehow a url rewriting tool using ISA server like the following:
He have a main url let say http://publicsite/
we have sharepoint implemented internal on a site called http://internal/sites/sitecollection
when we open http://publicsite/sites/sitecollection it will open http://internal/sites/sitecollection
http://publicsite/ is on a different server than http://internal.
Right now I have an issue with the embedded resources in the rendered html markup for the sharepoint site like
<script src="/ScriptResource.axd?d=MZkmbKEwKTBSRdxFCFncmF72UDKBF9tO54OpDYX6Df4DBmB7HSDbA8CAqY5mCBAK2TAU34oVF24xOS5EJEafjb6Zcvwnmou5zv3RqxNzcSKM1XXzvQP1JpAzOAaH9PUPRTPUjZfdMBnoJPmBfgNZ-BFEntGwjcL7UiqfpH8R9TE1&t=ffffffffed1cce36" type="text/javascript"></script>
effectually it opens from the root and root based on the customer rewrite rule is another server so the resource response with status 404
And AFAIN since the sharepoint web application on the root so I can't change the way it renders the url.
Is there any way to solve this?
I started to think about some javascript function to change the url of all scripts with starts with /ScriptResource.axd and change it to /sites/sitecollection/ScriptResource.axd but It faild to reload the javascript I don't know why!!
The 2nd solution Is to create the web application on a virtual path and I don't know if this possible or not, so can anybody help me?
Thanks in advance.
Regards
My first suggestion would be to create a different public url for sharepoint. You are going to save yourself a lot of hurt if you do.
But if you really need to go forward, you could try to implementing a HttpModule that replaces the bad references. And you are going to have to test this a fare bit it you are doing anything more than just viewing some content. (collaboration, office sync etc)
https://sharepoint.stackexchange.com/questions/5956/rich-text-editor-error-messages/8364#8364
You will probably need to change the path on the page. Changing the configuration of the ISA server will still leave you with the problem that the root is on a different server to the SharePoint site.
If the JavaScript approach did not work you could try use the "adaptive control behavior" as suggested as the answer for this Question, Where you rewrite all the Script tags, you will also need to rewrite the Style and Image tags as some will refer to /_layouts
A heavy handed approach though but Control adapters work well with SharePoint.
I am thinking you could extend the web app on the internal server to the additional url http://publicsite/. Now you will rely on intelligent IP routing so that if the URL is http://publicsite/sites/sitecollection it goes to your intranet server, otherwise it goes to the public server. It sounds as though your ISA server already does this. I think that would make all the relative links correct.