Hi Jose, 
Thanks for the fast response! Can you elaborate? I don't quite understand..
John

On Sunday, August 11, 2013 9:37:54 AM UTC-4, Jose Luis Rivas wrote:
>
> I think you are missing the OPTIONS. That's the method sent on the 
> pre-flight by the browser. 
>
> On 8/11/13 5:52 AM, Johnathan Mercer wrote: 
> > I successfully implemented a service locally but when I try to implement 
> > on my VM I get: 
> > 
> >     [blocked] 
> >     The page at [myurl;)] ran insecure content from 
> > http://69.173.71.80:3000/wines?   
> > callback=jQuery19107150888352189213_1376159198745&_=1376159198746. 
> > 
> > I tried adding: 
> > 
> >     var allowCrossDomain = function(req, res, next) { 
> >         res.header('Access-Control-Allow-Origin', '*'); 
> >         res.header('Access-Control-Allow-Methods', 
> 'GET,PUT,POST,DELETE'); 
> >         res.header('Access-Control-Allow-Headers', 'Content-Type'); 
> > 
> >         next(); 
> >     } 
> > 
> > to the configure in my server.js file: 
> > 
> >     app.configure(function() { 
> >       app.use(allowCrossDomain); 
> >     }); 
> > 
> > 
> > I am trying to access the data from within a js function like this: 
> > 
> >       $.ajax({ 
> >           url: "http://69.173.71.80:3000/wines";, 
> >           dataType: "jsonp", 
> >           success: function (data, textStatus, jqXHR) { 
> >             var obj = jQuery.parseJSON(jqXHR.responseText); 
> >             notify(data.toString()); 
> >             notify(textStatus.toString()); 
> >       }, 
> >           error: function (request, status, error) { 
> >              alert(request.responseText) } 
> >       }).done(function ( data ) { console.log(data);}); 
> > 
> > OR 
> > 
> >       $.get('//69.173.71.80:3000/wines', function(data) { 
> >           console.log(data); 
> >       }); 
> > 
> >     I have also tried ("http**s**://69.173.71.80:3000/wines") 
> > 
> > Any help would be great! 
> > 
> > -- 
> > -- 
> > Job Board: http://jobs.nodejs.org/ 
> > Posting guidelines: 
> > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines 
> > You received this message because you are subscribed to the Google 
> > Groups "nodejs" group. 
> > To post to this group, send email to [email protected]<javascript:> 
> > To unsubscribe from this group, send email to 
> > [email protected] <javascript:> 
> > For more options, visit this group at 
> > http://groups.google.com/group/nodejs?hl=en?hl=en 
> >   
> > --- 
> > You received this message because you are subscribed to the Google 
> > Groups "nodejs" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> > an email to [email protected] <javascript:>. 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> >   
> >   
>
>
> -- 
> Jose Luis Rivas 
> http://joseluisrivas.net/ 
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to