How can I debug/run local javascript file locally

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I debug/run local javascript file locally

destefano
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: How can I debug/run local javascript file locally

dmountney
On Tue 10 Jan 2012 01:28:02 PM PST, Estifanos Gebrehiwot wrote:

> Hi Guys,
> I am really sick of uploading/restarting server for every javascript
> file I edited.
> We are using portals with dojo.
>  I am trying to download one portlet change the necessary url location
> to map the local url, jsp into html and json getting from server I
> already have
> it on local which I configure our datastore as follows
>  eg.
> dojo.xhrGet( {
> url : "../devices.json",
> preventCache : true,
> handleAs : "json",
> load : function(data, ioArgs) {
> alert("loaded");
> var managedElements = data["ManagedElement"];
> device = managedElements[0];
> selectedDevice = device;
> }
>
> deviceDataStore = new dojox.data.JsonRestStore({
> //deviceDataStore = new CIJsonRestStoreExtension({
> //target:"../devices.json",
>    url:"../devices.json",
> idAttribute: "hjid",
>             filterOnServer: true,
>             pageOnServer: true,
>             syncMode: false,
> error : function(error) {
> console.log("CommonInventory-Portlet deviceDataStore error:"+error);
> }
> });
>
> in firefox and chrome I get cross origin requests are only supported
> for http error and nothing showing up,
> IE is not really helpful in debugging.
>
> any help is appreciated,
> to summarize it I am looking
>
> How to deal with chrome and firefox cross origin request issue, which
> is not working for file:///foo.jsp calls
> how to fetch local json from dojo.xhrGet or JsonRestStore
> --
> Peace Be With You
> Estifanos Gebrehiwot
> cell : 5103162285
> [hidden email] <mailto:[hidden email]>
>
>
> ________________________________________________________
> Dojotoolkit: http://dojotoolkit.org
> Reference Guide: http://dojotoolkit.org/reference-guide
> API Documentation: http://dojotoolkit.org/api
> Tutorials: http://dojotoolkit.org/documentation
>
> [hidden email]
> http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

If you're just worried about it in development, you can start chrome
with the --allow-file-access-from-files flag.

Here you can see the chrome issue on grabbing local files through
XMLHTTPRequest: http://code.google.com/p/chromium/issues/detail?id=40787

In firefox, I believe you can go into offline mode to trigger the same
sort of mode.

Note that you might run into to other issues as well with chrome if you
aren't using a webserver. You can't set cookies for example.
________________________________________________________
Dojotoolkit: http://dojotoolkit.org
Reference Guide: http://dojotoolkit.org/reference-guide
API Documentation: http://dojotoolkit.org/api
Tutorials: http://dojotoolkit.org/documentation

[hidden email]
http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Reply | Threaded
Open this post in threaded view
|

Re: How can I debug/run local javascript file locally

destefano
CONTENTS DELETED
The author has deleted this message.