Tag Archives: javascript

XML literals in JavaScript?

Questions: E4X (Ecma-357) is an extension to ECMAScript that adds XML literals as first-class primitives. That’s awesome, but with only Mozilla and Adobe support (without V8 and IE support too), E4X is virtually dead from a web developer’s perspective that has to support users with any modern browser. What other work is being done around… Read More »

handshaking a SQL server with Javascript

Questions: I want to try, as a learning excersise, get my javascript to chat to sql. var ws = new WebSocket(“ws://127.0.0.1:1433”); doesn’t seem to be a blocked port, so it should in theory work. I am looking for a breakdown of how to handshake with the sql server, and chat with it. A pointer in… Read More »

Scraping javascript website

Questions: I’m able to scrape data off of basic html pages, but I’m having trouble scraping off the site below. It looks like the data is presented via javascript, and I’m not sure how to approach that issue. I’d prefer to use R to scrape, if possible, but could also use Python. Any ideas/suggestions? Edit:… Read More »

How to add special characters like & > in XML file using JavaScript

Questions: I am generating XML using Javascript. It works fine if there are no special characters in the XML. Otherwise, it will generate this message: “invalid xml”. I tried to replace some special characters, like: xmlData=xmlData.replaceAll(“>”,”&gt;”); xmlData=xmlData.replaceAll(“&”,”&amp;”); //but it doesn’t work. For example: <category label=’ARR Builders & Developers’> Thanks. Answers: Consider generating the XML using… Read More »

Get Ajax POST data on php via Javascript call

Questions: First I am conface that I am Newbie to php, I am using jquery(knockout js) at client side & PHP at server side. my code. Client side: I am using knockout js(Javascript). to call my PHP service. My Code: self.VMSaveEditUserMode = function () { try { var params = { “ClientData”: [controllerVM_.ClientID(), controllerVM_.VMList[0].ClientName(), controllerVM_.VMList[0].ShortName(),… Read More »

Rails production server not using latest javascript file

Questions: I have a server where I have set nginx and Rails app. When I load page, my css and javascript links goes like this: <link rel=”stylesheet” media=”all” href=”/assets/application-01b482b5cbd306773ee4d7bc86b222a5d0c9b1c2dc82302957bc752dc079f6aa.css” data-turbolinks-track=”true” /> <script src=”/assets/application-cc1e40cfd63b56dd14a482241c0d44cc69c37206eeeb546d3f88ce94e09f8abc.js” data-turbolinks-track=”true”></script> The problem is when I load the page, I am always getting an error 404 Not Found for the javascript file… Read More »

How to view the last GET HTTP request in JavaScript

Questions: How can I view the last GET http request in JavaScript? Basically what I am after is what I can see my firebug console. When XMLHttpRequests are showing in console I see a line that looks something like: GET http://www.domain.com/php/file.php?q0&c=1 200 OK 163ms How do I view that URL in JavaScript? EDIT: Just to… Read More »