Hi,
I've got a Pylons controller with an action called serialize returning content_type=text/csv. I'd like the response of the action to be named based on the input patameter, i.e. for the following route, produced csv file should be named {id}.csv : /app/PROD/serialize => PROD.csv (so a user can open the file in Excel with a proper nam...
Hi guys,
I have a link and if a user clicks it I need 2 things to happen: A proper HTTP response is sent to the user (especially with Content-Type: video/mp4) and a video file will automatically begin downloading. I have seen something of the sort with php, but I need it only with html/javascript. Is this possible?
Thanks
Alex
...
I have two tables:
create_table "friendships", :force => true do |t|
t.integer "user1_id"
t.integer "user2_id"
t.boolean "hasaccepted"
t.datetime "created_at"
t.datetime "updated_at"
end
and
create_table "users", :force => true do |t|
t.string "email"
t.string "password"
t.string "phone"
t...
What could it mean if I make an ajax request with the jQuery .load() and I get no response at all in firefox or chrome, and in ie8 I get an error saying "Access is Denied"?
...
Hello,
this is probably so trivial that I'm ashamed to be asking this...
Why in the world is this not working?
<?xml version="1.0" encoding="UTF-8"?>
<filter id="4" max_values="10">
<value id="9">strategy</value>
<value id="11">simulation</value>
<value id="12">shooter</value>
</filter>
This is the xml response I get when...
Hello.
I am using this script to insert comment to the database:
var http = createObject();
var nocache = 0;
function insert() {
document.getElementById('insert_response').innerHTML = "To Sek .. "
var fID= encodeURI(document.getElementById('fID').value);
var kommentar= encodeURI(document.getElementById('kommentar').value);
nocache = Mat...
I am using this script to insert comment to the database:
var http = createObject();
var nocache = 0;
function insert() {
document.getElementById('insert_response').innerHTML = "To Sek .. "
var fID= encodeURI(document.getElementById('fID').value);
var kommentar= encodeURI(document.getElementById('kommentar').value);
nocache = Math.rando...
In an ASP.NET application, I'm using iTextSharp (PdfStamper, mostly) to fill in some content on a PDF and send it to the user. The following code is inside an OnClick event:
PdfReader r = new PdfReader(
new RandomAccessFileOrArray(Request.MapPath(compatiblePdf)), null
);
ps = new PdfStamper(r, Response.OutputStream);
AcroFields af =...
I'm writing a web application that involves a continuous cycle of creating (and removing) a fair number of images on a webpage. Each image is dynamically generated by the server.
var img = document.createElement("img");
img.src = "http://mydomain.com/myImageServer?param=blah";
In certain cases, some of these images outlive their usefu...
I was wondering has anyone come across thos error in SIP before?
WARN/System.err(4623): javax.sip.SipException: Response does not belong to this transaction.
I get it after I get an invite, I then send back 100 trying followed by 180 ringing.
Then the user can either press Reject or accept on the screen.
If they press reject I s...
Every time I try to make any change it doesn't work...
Whether I click delete module, try to move a module to a new pane, add a module, even switch from "Add New Module" to "Add Existing Module" all it does is look like it's trying to process (page refreshes, or updates anyways...) and then nothing happens. The page turns out the exact ...
Hi, I'm trying to centralise my redirects (based on authentication and various other states) into a front controller plugin. So far I've tried:
$this->setRequest(new Zend_Controller_Request_Http('my_url'));
at various points in the plugin (i.e. from routeStartup to dispatchLoopShutdown) and also:
$this->setResponse(new Zend_C...
If your controller action looks like this:
respond_to do |format|
format.html { raise 'Unsupported' }
format.js # index.js.erb
end
and your functional test looks like this:
test "javascript response..." do
get :index
end
it will execute the HTML branch of the respond_to block.
If you try this:
test "javascript response..." ...
{"imgsrc":"http:\/\/192.168.1.181\/postcardthis\/facebook\/angel_wall.jpg","message":"asdf","friend":"Friend1","error_message":""}
this my json, here imgsrc location seems dificult, two slahes. what to do to convert perfect url?
...
I have an HttpModule where I lookup the content type and then apply some filters to the response. There are some instances where I don't want to apply one of these filters but that isn't determined until the page_load event later on. Is there any way to remove a filter??
...
I've implemented more complex AJAX before with javascript and PHP, but for some reason this refuses to work. This is copied almost directly from the W3 example.
var xmlhttp;
function changeLoc(str)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
{
alert ("Browser does not support HTTP Request");
return;
}
var url="acti...
Im working on a response filter. Im trying to catch all expresion: $sometext.sometext$ with the following regular expression: ^\w+?.\w+?\$
In my implementation it looks like:
public override void Write(byte[] buffer, int offset, int count)
{
// Convert the content in buffer to a string
string contentInBuffer = UTF8Encoding.UTF8...
I have an asp page that loads a response " user=exists " everytime I try to update a database record (when of course the record already exists!)
How can I handle this response with AS3 in Flash?
...
I have a flash file that displays the server respone on screen. The respone is in XML format.
When I use this code: statusText.text = xmlResponse; I get result on screen like
%3%20xml
etc.
What 's wrong with that? I tried the methods toString() and text() but nothing worked
...
When I create request to the server:
<script language="javascript" type="text/javascript">
function ajaxFunction()
var ajaxRequest;
try{
ajaxRequest = new XMLHttpRequest();
} catch (e){
try{
} catch (e) {
try{
ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
alert("Your browser broke!");
return false;
}
}
}
ajaxReque...