I want to create a Web Widget. It must access remote clojure data structure and display elements of it requested by a widget parameter. The visual style would also be dictated remotely.
EDIT:
Youtube has this:
<iframe width="560" height="315" src="//www.youtube.com/embed/Z6bFyVGvg28" frameborder="0" allowfullscreen></iframe>
Google Maps has this:
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.ca/maps?q=yahoo+corp&ie=UTF8&hq=&hnear=&ll=37.417223,-122.025112&spn=0.006295,0.006295&t=h&iwloc=A&output=embed"></iframe><br /><small>Agrandir le plan</small>
So I suspect an iframe that targets a specific URL handle by the remote server could do the job.
There are indeed tradeoffs between writing your widget inside an iframe or simply inline the page and make it part of the dom of the hosting page.
http://prettyprint.me/prettyprint.me/2009/05/30/widgets-iframe-vs-inline/
This is a very similar request which it's achieved in this David Nolen demostration project:
https://github.com/swannodette/om-sync
based on his clojurescript react.js thin layer called"om":
https://github.com/swannodette/om
Related
How to show an html document within ember template without affecting the css styles of ember app ?
The html document has a style tag which conflicts with the css of ember application.
Got a workaround using YUI css reset.
href="http://yui.yahooapis.com/3.18.1/build/cssreset-context/cssreset-context-min.css">
<div class="yui3-cssreset"></div>
I have various PDF documents as blobs in the App Engine blobstore. Now, I want to preview them on a HTML page. From various other questions, I figured the HTML setup should be:
<embed src="{{ url_to_my_pdf_blob }}" width="500" height="600">
While experimenting, I found that in the SDK the get_serving_url function will not only work for images but will also work for PDF blobs. This approach unfortunately fails in production.
I looked at the example using blobstore_handlers.BlobstoreDownloadHandler but could not figure out how to wire this to my view (my app is based on Django, the HTML file with the preview is served by a Django view class).
How do I get the url of the blob?
You need to define a ServeHandler, as described here:
https://developers.google.com/appengine/docs/python/blobstore/#Python_Serving_a_blob
For examples of the implementation, see Downloaded filename with Google App Engine Blobstore.
I got a job on a freelance site to make a calculator where the user enters values into text fields. The problem is all they told me is they need to be able to publish it in html. I'm used to using asp.net and c#. I've never used javascript but it seems like that maybe what I need to use. is there any way I could make an app with java or c# and be able to add it to html?
I would use HTML and javascript, all you need to do is type <script> *javascript Here* </script>. I currently have a web app that calculates how much insulin a diabetic will need. Post a comment and ill send you a link to it for reference. It's as simple as
<script>
var x = document.getElementById('textX').value;
var y = document.getElementById('textY').value;
var z = x + y
document.getElementById('labelA').innerHTML = z;
</script>
<body>
<input type="text" ID="textX" onchange="valuechanged();" /> +
<input type="text" ID="textY" onchange="valuechanged();" /> = <br>
<label ID="labelA"></label>
That will make a value + value calculator. You can develop this code to be as complex as you want. Also remember to add the header tags ect.
Java / C# are SERVER technologies, HTML / JavaScript are CLIENT technologies. If the requirement is that the page be only a basic html publish (no server technology present) then JavaScript is your only choice. ASP.net or Java are basically programs on the server which decide what HTML to render dynamically, instead of an .html page which is static content.
Once the HTML is downloaded, then JavaScript can be used to manipulate the Document Object Model (DOM) to change the HTML that is rendered from memory. To do calculations in an HTML/JavaScript application, the browser is doing the computation and replacing the information without ever communicating with a server, asking for a new page or for more information, etc. In contrast, a C# application would be running on the server, waiting for the browser to send something to calculate, then the server would do the calculations and send back a new page with the result.
There are hybrid options as well, so it's definitely not wasted effort to learn JavaScript.
I've done some research and learned that for Joomla 1.5.9 to work with iframe tags you must set permissions in article manager > parameters > filtering groups to whitelist the super administrator, and then set user manager > select user > user editor to "Editor - No Editor". After doing this, then opening an article, opening the html editor and inserting the iframe like so:
<iframe src="http://thewebsite.tumblr.com/" width="100%" height="300">
<p>Your browser does not support iframes.</p>
</iframe>
The editor continues to strip out the iframe code. Why would this happen?! I'm sure all of the settings I've mentioned earlier are set according to the tutorials I've come across. Are there any factors I need to take into consideration that I'm missing? Is there another way to insert an iframe into a custom template?
I hope someone can help!!
Inside an Article you are best of using a plugin :
http://extensions.joomla.org/extensions/4144/details
it gives you the ability to insert an iframe by using e.g. {iframe width="90%" height="300" frameborder="1" scrolling="yes"}url{/iframe} also within the TinyMCEeditor.
If you don't need antyhing else inside the article you can use menu item/link. Internal Link - Wrapper
When the Wrapper link is selected, it expands to display the Wrapper layout. This is used to show an external web site inside a page in your web site, using an HTML IFrame. The external web site is contained inside the Wrapper. You can navigate to different pages in the wrapped web site, all inside the page of your web site.
http://docs.joomla.org/Help16:Menus_Menu_Item_Wrapper
Somebody know how use OpenX (php app) with Django? I need to use OpenX or a similar software for displaying ads.
As Tomsky answered you don't need any special software just to display ads - you can just use javascript.
However, if you want to access the server and manipulate the OpenX objects such as campaigns, banners, advertisers, etc, you will need some kind of remote API. For that OpenX Source provides a XML-RPC API but I also developed a REST API:
http://www.openxrest.com
You can implement Openx using javascript, so as long as you run Openx on a php server, that should be easy.
Header, something like this:
<script type='text/javascript' src='http://something.here/delivery/spcjs.php?id=1&block=1'></script>
And then, something like this where you want to put you ad.
<script type='text/javascript'>
OA_show(1);
</script>
<noscript>
<a target='_blank' href='http://something.here/delivery/ck.php?n=112bda3'>
<img border='0' alt='' src='http://something.here/delivery/avw.php?zoneid=1&n=112bda3' /></a>
</noscript>
OpenX generates all this code for you.
Here's a project that gives you API integration. If you only want to serve ads, you don't need it though, you just have to paste the javascript provided by OpenX.