08-27-2013 02:03 PM
Hi
There is no poblem to run this web services with a labview vi or directly with the browser. The problem is the parserror I get when I use jquery(javascript).
Attached is a zip file with the project and the html files
Thanks...Eran
08-27-2013 02:09 PM
Ahhh... so its specifically a jquery problem.
I did that once, but don't have the code with me. I'll look for it tonight. In the mean time do some checking with the jquery support forums.
Mike...
08-27-2013 04:43 PM
01-31-2014 01:35 AM
Hi there, i think i've got exactly the same problem.
i've a vi running as webservice which should output just plain json, which is ok when i run it via browser.
when i use it in jquery - nothing happens, the response is empty although other non-labview json sources are working.
i can only guess what this really is but maybe someone has a clue, this really gives me headache!
thanks a lot
andy
02-02-2014 05:29 AM
I found the cause for the problems
You can not add header("Access-Control-Allow-Origin: *") when you build the webservice (in the servere side)
You can get json with labview but you can not get JSON (from labview webservice) with javascript code
02-02-2014 05:43 AM - edited 02-02-2014 06:03 AM
it is def. the sop problem and after putting the whole stuff onto the NI webserver it worked. i'm currently trying to get jsonp to work - i found some NI document were they refer to jsonp and therefore i hope this will work out!