Can openx server just xml for a banner instead of adding html? - openx

I want to set up a zone in openx which will be invoked from a flash application, so I want openx to just serve back whatever xml I paste into the 'generic html banner'. Problem is when I use the invocation code for the zone, openx is putting some html around the xml i specified.
Is there a way to get openx to return the xml without adding html around it?
Edit: The same problem occurs no matter what zone type you enter, openx wraps some extra text around it. It appears what I want to achieve cannot currently be done with openx.

After investigating, I have found there is no out of the box way to get openx to return the xml entered without modification.

It might be possible using xml-rpc. However, if this is not a viable option, then you can consider creating a clone of the ajs.php file to only throw out banner content.

Related

Reading a PDF back from an iFrame?

I have a PDF document that is getting generated on the fly, and rendered on the fly to an iFrame within a radwindow. Basically the document is already largely prepopulated, however the user will still have a chunk of information that they are required to enter. I've found a good amount of information about sending a pdf TO an iframe, but not much information about going the other way. I have a button within the radwindow that can access the iframe object, however I'm somewhat lost as to where to go from there.
EDIT: The PDF is an editable form. I'm trying to pull back the entire PDF document as is, after the client side makes their entries to the form.
I think you'll need to send the file to the user so they can edit it locally and instruct them to upload it.
The content-disposition header with value attachment can help with the first task and you can use RadAsyncUpload to upload it: http://demos.telerik.com/aspnet-ajax/asyncupload/examples/overview/defaultcs.aspx.
I am not aware of ways to tap into the PDF viewer plugin the browsers use to show the PDF. Perhaps there is API from Adobe or some other third party plugin but that would rely on them and is out of your control.
Perhaps the JS PDF viewer from FireFox has something: https://mozillalabs.com/en-US/pdfjs/ but I don't know how stable and usable it is.
As per what was described in the comments, I ended up using postbacks through the PDF's themselves along with 1 pixel fields to store data required to identify the documents. It's a little hacky, but functional. I'm leaving this as an actual answer as this is as close to a real solution to the problem I originally had. This has been up and running for close to 4 years in this manner, and thus far hasn't caused any issues.

Inject HTML into iframe across domain

In the html, there's one iframe loading external page from different domain. And I cant change the source code of this external page.
Now I want to inject some html codes into the iframe, such as adding one link in the external page.
What's the possible way for me to do that?
I tried to use contentWindow.document, but getting permission issue.
Any help will be appreciated.
I think this is not possible. however if you want to do this at any cost, you can download the required page using server side like file_get_contents('http://www.google.com'); in php. and make changes to it, save it in a file on your server and then open it in iframe you want to.

Drupal Content changes to Plain text on Cron run

I add content to an article (either administrator or as content user) and I save the changes as Full HTML or Filtered HTML.
Once I run CRON,the article is marked updated and when I preview it i see plain text instead of HTML.Some sort of over writing is taking place which I am unable to figure out.Earlier I thought it was a problem with the webform module but it is not.I tried disabling the modules one by one but was not able to detect the problem.
Do you check your content under the same user ? I can hardly believe it's a time related issue. It seems more like a rights problem. Do all the relevant roles have access to the input filter Full HTML ?

Saving contents of <pre> tag to file on server

I have searched here and googled for this, and I've probably come across an answer, but I guess I don't understand asp.net enough to get it working. As the title says, I'm trying to save the contents of a tag to a file on the server. I'm specifically using asp.net because I'm developing for a website on a WHS box and I'd like to use the already existing FBA.
Using javascript, I can successfully get the contents, but I am unable to work with it from there. From what I've read, it sounds like I need to POST the contents, either a postback or to another page, to save the file. That's what I'm having problems getting working. I can get a StreamWriter created and working, but I am unable to pass what I need to it.
Thanks for any help, and I can post some of the code I have now if needed. JR
You need to use Javascript to send an AJAX request to an ASHX handler with the text as the POST body.
You can then read the POST in the ASHX handler from the Request object and write it to disk.

Printing receipt ASP.NET

I'm currently making a project where I need to print out a receipt on a receipt printer.
At the moment i'm using the CSS mechanism media=screen , media=print to indicate what to print.
Problem is of course the header and footer which can't be removed, as it is client browser specific.
So i'm wondering if anyone has another suggestion on how to do the printing. Preferbly without using too much IO.
Generally speaking, if you need precise control, your best bet is to have a pdf, or other doocument format that is generated from the server, for your printing. (if the machines printing receipts are controlled, and have word, than .doc (html with an output type) is the easiest method. There are a number of third party controls for generating PDF from server-side code as well. Hope this leads you in a usable direction, since you didn't specify if you controlled the client machines in use.
One benefit to PDF is you can use it as a hard archive, as well as being able to email receipts as an attachment.
The header and footer information (Assuming you're talking about the URL showing up at the bottom of a page) is client-side and there is nothing you can do to change that from server side.
If all of your printing is going to be done from inside your company, you could have a group policy created for Internet Explorer printing to remove these company-wide. You could also just have instructions on your page on how to change these setting manually.
Another option is to print with a 3rd party application, such as PDF, or print it directly from the server if that option is available to you.
Do you mean the page header and footer?
If that's the case, wrap the header and footer in IDs and create CSS tags to target them and give them a much simpler styling, or you can use the CSS element display:none to remove them altogether in the print css.
You could load the content you want to print into an iframe, focus on it, and print that. That way you'll have exact control over what appears on the receipt.
It'd take a small bit of javascript, but I've had success doing similiar things when I wrote a custom contract printer.
It's not an ASP solution, but may help:
http://code.google.com/p/jzebra
It's a java plugin that can bypass the header and footer stuff.

Resources