XML & Javascript Parser
Feb 28, 2006
In order to build a weather prediction page, I was thinking to write
down a Javascript (on the client). This javascript should contact a
server (www.live.com) in ordert to extract the weather forecast.
In summary, I want a javascript based on the html client (internet
Explorer), creating a connection and extractign the data.
This sounds simple but for whatever reason, I cannot manage to extract
any data of this XML page....
View 8 Replies
ADVERTISEMENT
May 10, 2006
I have to perform a lot of editing of xml data on the client-side(browser), using javascript. (before i display the data on the browser).
Which xml parser is better for accessing and editing xml elements/attributes through javascript code.
View 7 Replies
View Related
Oct 24, 2007
does javascript can parse text-based files, same as vbscript do? I
want do a sorting of large massive of eml files stored in folder: just
to arrange(sort) eml files inside that folder by recipent email ("To:"
field) (there is different data in "To:" field due different senders)
Just want that script parse eml files, looked for specified emails
address or name in 'To' field and arrange this emails at the top. This
probably will require ActiveX.
View 6 Replies
View Related
Oct 19, 2004
Does anybody know of a utility that will return the output of javascript code? Preferably it needs to be usable from the command line in Linux. I want the utility to output something like this:
<ul>
<li>1
<li>2
<li>3
</ul>
From this:
<script>
document.write('<ul>');
for (i=1;i<=3;i++) {
document.write('<li>' + $i);
}
document.write('</ul>');
</script>
View 1 Replies
View Related
Jul 23, 2005
i am looking for parser which is seperating java script content.
View 1 Replies
View Related
Mar 21, 2005
I'm wondering if there's a built in function or a script already written to parse a CSS file. I can explain later if anyone is interested in why I want to know.
View 10 Replies
View Related
Nov 23, 2005
Has anyone seen a great tutorial on how to use the dom to properly parse an
xml document? I was hoping to find something in depth that might show maybe
via a pictorial how child nodes and node data etc relates to an example xml
document.
View 8 Replies
View Related
Jul 23, 2002
function qq(str) {
while (str.indexOf('$') != -1) {
str = str.replace(/$[^sW]+/,eval(str.match(/$([^sW]+)/,"$1")[1]));
}
return str;
}
Usage:
var greet = 'hello' var name = 'john'
alert(qq('$greet there $name!'));
Not overly useful, I just hate having to 'string '+var+' more strings' all the time.
There are some limitations (vars must be global, etc), but maybe someone will find it helpful. I certainly have.
View 3 Replies
View Related
Apr 20, 2011
I need a solid and reliable RSS parser for my web page. I saw jPage and it looked good except the RSS must be on the same domain - which seems to miss the point a bit.
View 3 Replies
View Related
Mar 27, 2007
I'm interested in finding some JSON libraries for javascript that
contain a stringifier and/or parser. I've been using what appears to
be the reference implementation from json.org (written by Douglas
Crockford?), but I'm running into two problems:
(1) The lack of support for the hasOwnProperty method in Safari
(2) Odd, intermittent errors in Gecko browsers, something to the
effect of "llegal operation on WrappedNative prototype object."
If anyone's familiar with other libraries, or with ideas for working
with these issues in using the json.org library, I'd love to hear
about them.
View 1 Replies
View Related
Jan 6, 2011
I would like to write a parser like the one below except I would like it to take characters with the the digits like 345j, 982p0, what would I change to be able to have characters with numbers?
View 1 Replies
View Related
Mar 19, 2010
This one has plagued me for some time now. I am parsing an XML file for a search feature. On my local machine, the code below works fine in FF, but when I upload it, I get an error stating y[0] (the root element) is undefined. I think the problem may be with my onload method but I can't be sure.
function importXML()
I just can't figure out why this works locally and not on the server. IE works fine, but then again it uses the activeXObject method so it should function differently.
View 6 Replies
View Related
Sep 17, 2009
I am using Tablesorter to work with a simple table, but have comeacross an interesting difference in how it works between browsers.One of my columns looks like this:
Row 1
img src="http://dssweb/apdashboard/images/Green.png"
class="client_status" title="1. UAT testing Sept 09"
[code]....
View 3 Replies
View Related
Mar 24, 2011
I'm trying to incorporateRemy's select-chainplug-in into my code, and I'm having troubles. I hopesomeone can take a minute or two to help me. My situationseemed simple, only 2 levels, Products and Programs under each Product. I have the back-end working, so it returns the JSON list of Programswhena Product ID is passed. However, the plug-in keeps failing in the .ajax() function, tripping the error(). It reports a "parsererror", so I know I've messed up something. One wrinkle, I have multiples of the Product/Program pairs on my page, identified as "prod_x"/"prog_x", so I need to dynamically call them. Here is my code:
[Code]...
View 7 Replies
View Related
Jun 26, 2009
can a web parser differentiate between static and dynamic text on a webpage? for example there is a string on a webpage Hello "Fantastic Four"In this "Hello" is a static data and "Fantastic Four" is a dynamic data (say being populated form a database value)Is it possible for web parser to detect whcih is a static and dynamic content?
View 3 Replies
View Related
Mar 19, 2010
I'm trying to get a drop down menu that can be activated by clicking on the main menu button, but have problem with the 'id'. When i declare the id's as a number, it gives errors through the sgml parser of my html validator (you can't use numbers to declare id's). But when i change the id in a letter, eg 'a', the menu doesn't work...
[Code]...
View 2 Replies
View Related
Jul 23, 2005
I'm working on some code and am running into brick walls. I'm trying
to write out Javascript with Javascript and I've read the clj Meta FAQ
and didn't see the answer, read many similar posts (with no luck
though), and searched through the IRT.ORG Faqs
(www.irt.org/script/script.htm).
The Javascript is designed to open an popup window and then inside that
window call another script which will resize that window. There may be
another way around this but the reason I tried this approach initially
was that I wanted to call the onload handler in the popup window to
resize the image only after the image had completely loaded. I've had
some code in the primary Javascript file (showimage.js) before that
works if the image has been cached but on the first load, it doesn't
resize properly which tells me it is probably because it is trying to
resize the window based on the image size but it isn't completely known
at that point. So I removed that code and tried placing the resizing
code in the second Javascript file (resizewindow.js). BTW I've tried
other code to open a popup image and automatically size it ie Q1443 at
irt.org but that doesn't do exactly what we need.
Even if there is another way to do this with one file, I still want to
figure out why this isn't working in case I run into it in the future.
I thought what I would need to do to use document.writeln to write
Javascript would be to escape any special characters and to break
apart the script tag ie
document.writeln('</SCRIPT>');
would become
document.writeln('</SCR' + 'IPT>');
I have a HTML page and 2 Javascript files. All files are in the same
directory and have permissions set correctly.
Here are the 3 files (keep in mind wordwrap has jacked up the
formatting):
index.html
----------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test</title>
<SCRIPT type="text/javascript" LANGUAGE="JavaScript1.1"
SRC="showimage.js">
</SCRIPT>
</head>
<body>
Click the house<BR>
<A ONCLICK="newWindow1('house1.jpg','Nice House')"><IMG
SRC="house1thumb.jpg"></A>
</body>
</html>
showimage.js
------------
function newWindow1(pic,sitename)
{
picWindow=window.open('','','width=25,height=25,sc rollbars=1,resizable=1');
picWindow.document.writeln('<html> <head>');
picWindow.document.writeln('<SCR' + 'IPT type="text/javascript"
LANGUAGE="JavaScript1.1" SRC="resizewindow.js"></SCR' + 'IPT>');
picWindow.document.writeln('</head>');
picWindow.document.writeln('<body onload="resizewindow();">');
picWindow.document.writeln('<img src=' + pic + '>');
picWindow.document.writeln('</body> </html>');
picWindow.document.close();
}
resizewindow.js
---------------
function resizewindow()
{
// Do resizing here.
// Right now this isn't being executed
alert("resizing window");
}
Can anyone provide some pointers as to why this javascript is failing?
I'm using IE6 on Win2k and when I click on the image to open the popup
window, it does open the window but it is white with no content and the
system immediately goes from about 4% CPU usage to 100% and
consistently stays there until I kill that window with the task
manager.
View 9 Replies
View Related
Jul 23, 2005
Attached is a simple HTML file that adds and delete rows. In the add
row function I set an attribute "onClick" this triggers the
testMessage() function. When I try this in Firefox it works just fine
however on IE it just refuses to work.
What is interseting is the ROW that already exists has a similar
'onClick' event which works when the page is loaded, but subsequent
"row" additions to the table to not work in IE. Code:
View 9 Replies
View Related
Feb 19, 2007
two possibilities or the attribute type of script:
text/javascript (the one i usually use) application/x-javascript
what are the differencies between both?
depends on the html content?
for example html 4.0.1 versus xhtml 1.1?
View 12 Replies
View Related
May 25, 2005
I'm getting errors in Firefox everytime I try to run this frame resize code, but it works fine in IE. I can't seem to figure out what the problem is with it.
The error is: Error: theFrame has no properties
Line: 8
The line that the javascript console is showing an error for is in italics.
code from page:
<html>
<head>
<script type="text/javascript">
var defaultCols="100px,*";
var hiddenCols="0px,*";
function ShowHideMenu(){
theFrame = document.getElementById("framed");
if(theFrame.cols == defaultCols) theFrame.cols=hiddenCols;
else theFrame.cols=defaultCols;
}
</script>
<frameset cols="100px,*" name="framed">
<frame src="lframe.htm" name="frameMenu">
<frame src="mframe.htm" name="content">
</frameset>
</head>
<body>
</body></html>
Come someone let me know what I'm doing wrong here?
View 2 Replies
View Related
Mar 30, 2006
I'm already past the basics of Javascript, and i need something that takes me to the other level and teaches me the new technologies and cool stuff (drag&drop, AJAX, OOP in javascript, maybe XUL...etc). So far i found these two books:
1. Sitepoint's "The JavaScript Anthology: 101 Essential Tips, Tricks & Hacks".
2. Worx's "Professional JavaScript for Web Developers (Wrox Professional Guides)"
Both seems to cover very insteresting topics, but i can only buy one of them. So which one do you suggest?
and by the way, i've read the sample chapter 5 of Sitepoint's book, and it seems like the author(s) just put the solutions/codes there and let you figure them out on your own. Is this how the rest of the chapters are?
View 3 Replies
View Related
Jul 23, 2005
This is a question about defensive web browsing. Ocassionally I run into a page whose JavaScript does something that I find obnoxious. I would like to turn off JavaScript only for that page (instead of disabling it globally). It would be cool if there were some way to do this through a "bookmarkable" JavaScript snippet using the javascript: pseudoprotocol. Does anyone know any trick to do any of this?
View 2 Replies
View Related
May 26, 2006
I am looking for a method to extract the links embedded within the
Javascript in a web page: an ActiveX component, or example code in
C++/Pascal/etc. I am looking for a general solution, not one tailored
to a particular page/script.
Hopefully, the problem can be solved without recreating a complete
Javascript interpreter. Any ideas?
View 9 Replies
View Related
Oct 21, 2005
I have some javascript that I have written into the <body> section and it works great. But I would like to make it into a javascript function and define the function in the <head> section. Then in the <body> section write a small bit of javascript that would call the function() object. Code:
View 2 Replies
View Related
Jan 7, 2006
I would like to know how to write javascript such that, a part of it isnt considered as script, & rather as HTML. Code:
Ok, the layer div can be written using document.write. But, Google ad itself is a javascript isnt it. How can it be written into this? How does this work?
View 3 Replies
View Related
Apr 28, 2006
Ok so, this is my purpose:
- to be able to load asynchronously (via AJAX) some javascript ads (like google's or adbrite) so as to make them be loaded in the background, then update the page after the ads have loaded via innerHTML
Why?
-Because 90% of the time in my newer sites, javascript ads are the major offender in terms of speed of page rendering
My problem:
Via ajax, I can call a php file that retrieves some javascript and outputs it, XMLhttprequest returns those javascript lines, but they don't render in the page, since they miss the whole page loading, and are apparently not parsed
For example, let's say I call a php file via ajax, and it returns the output into a variable named "text" containing "document.write('hello')"
if I use xxx.innerHTML=text, nothing happens
My 1st solution:
Passing those javascript lines to eval() [like eval(text) ], but this produces a second problem, that I couldn't solve (probably because of my lack of knowledge in javascipt):
if I eval the code, it deletes my current page and renders a new one
for example, if I parse a document.write, my page disappears, and a new one is rendered with the document.write text
What I want is basically to make that "document.write" appear inside a div in my page, adding to the content (and not overwriting the whole page), much like what happens when using innerHTML
Is this even possible? How would you go about it?
I tried xxx.innerHTML=eval(outputfromphpfile) but it overwrites my whole page...
View 3 Replies
View Related