here's my perl proxy cgi
#!/usr/bin/perl
use LWP::UserAgent;
use CGI;
$ua = LWP::UserAgent->new;
$ua->agent("NuBrowser/10.7 ");
$res = $ua->request(HTTP::Request->new(GET => $ENV{QUERY_STRING} ||
"http://www.woot.com/DefaultMicrosummary.ashx"));
$q = CGI->new;
print $q->header($res->headers->{'Content-Type'}),$res->content;
print "<!--\n";
print $_,': ',$res->headers->{$_},"\n" foreach keys %{$res->headers};
print "-->\n";
that's it! the comments at the end helped me debug!
On 3/13/07, abba bryant <[EMAIL PROTECTED]> wrote:
>
> You need to proxy your request. I am not going to explain how to do this (
> it's complex ) but here is a link.
> http://www.fleegix.org/articles/2005/11/07/cross-domain-ajax-requests
> I reccomend this link particularly highly if you are using PEAR libraries
> already as it uses PEAR's HTTP_Request classes.
>
>
>
> JQuery - SimDigital wrote:
> >
> > ohhhh my!
> > I can't use "http://www.otherdomain.com/search.php" to Post data??????
> >
> > The app that i was building need this everytime :-S
> >
> > Have another way to submit data (Get / Post) to another server process
> > and bring me back after with an ajax request?
> >
> >
> > Jake McGraw escreveu:
> >> Couple of things you need to do here:
> >>
> >> 1. You can not use AJAX to POST to URLs outside your current domain,
> >> not even subdomains, so, just to be sure your requesting pages on your
> >> current domain, change the target url from:
> >>
> >> "http://localhost/Ismart/modules/business/search.php"
> >>
> >> to
> >>
> >> "search.php"
> >>
> >> 2. If you're using PHP, the POST variables should automatically be
> >> loaded into both the $_POST array and the $_REQUEST array, to see
> >> whether you were successful, given:
> >>
> >> {name:"Test",city:"test"}
> >>
> >> then the following variables should be set:
> >>
> >> $_POST['name'], $_POST['city'] and $_REQUEST['name'], $_REQUEST['city']
> >>
> >> Hope that helps,
> >> - jake
> >>
> >> On 3/13/07, JQuery - SimDigital <[EMAIL PROTECTED]> wrote:
> >>
> >>> I'm trying to submit some data from form fields without reload the page.
> >>> I try a bit of codes and it doesn't work.
> >>>
> >>> Take a look what i'm doing and teach me please.
> >>>
> >>> <script>
> >>>
> >>> $("#button").click(function(){
> >>>
> >>> $.post("http://localhost/Ismart/modules/business/search.php", { name:
> >>> "Test", city: "test" } );
> >>> }, function(ret){
> >>> $("#content").html(ret);
> >>> });
> >>> </script>
> >>>
> >>> <input type="text" id="name">
> >>> <input type="text" id="city">
> >>> <input type="submit" id="button">
> >>>
> >>> Ps.: I put fields value fixed as could be seen before (name: "Test",
> >>> city: "test" ) because i don't know how to solve this too.
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> jQuery mailing list
> >>> [email protected]
> >>> http://jquery.com/discuss/
> >>>
> >>>
> >>
> >> _______________________________________________
> >> jQuery mailing list
> >> [email protected]
> >> http://jquery.com/discuss/
> >>
> >>
> >>
> >>
> >>
> >
> >
> > _______________________________________________
> > jQuery mailing list
> > [email protected]
> > http://jquery.com/discuss/
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Ajax-POST-removing-spaces-from-inputs-tf3396281.html#a9462487
> Sent from the JQuery mailing list archive at Nabble.com.
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
--
Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/