473,386 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Clipping a remote webpage with Javascript/XPath and including in a "local" webpage

I have searched this (and other) groups extensively, in addition to the
clj FAQ and the Web, and (to my surprise) this question doesn't come up
as often as I thought it would. Maybe this is because either is
patently impossible or I am not searching for the right thing. If
either of these is the case, of course, please let me know.

What I am trying to do is grab a little snippet of data from a remote
page based on user input in a form. Take a look at this page:
http://www.qrz.com/kb2gsd

What I want to do is: when a user types the callsign (in this case,
KB2GSD) into a form field, I want to execute an XPath query via
Javascript to automatically complete the Name, Location, etc from a web
page like the one listed above.

I can compose the requisite XPath query without a problem, and I'm
pretty sure I can create the code to initiate the query, but I'm not
sure how (if it's even possible) to execute such a query on a remote
page. I am somewhat familiar with the document.evaluate() method, but
is there a way to "evaluate" a page other than the one currently
loaded?

Thanks for reading and thanks for a reponse if you're able to help.

PB

Dec 12 '06 #1
2 1792
soren625 wrote:
I have searched this (and other) groups extensively, in addition to the
clj FAQ and the Web, and (to my surprise) this question doesn't come up
as often as I thought it would. Maybe this is because either is
patently impossible or I am not searching for the right thing. If
either of these is the case, of course, please let me know.

What I am trying to do is grab a little snippet of data from a remote
page based on user input in a form. Take a look at this page:
http://www.qrz.com/kb2gsd
Is the remote page in the same domain/server as your script page? That
is, the javascript security model will not allow you to contact a third
party site.

If the data is on your own servers then yes you can have javascript
contact the server and request the information. You can do this either
through javascript forms and submits via get and post. Or you can get
fancy and use AJAX to do the lookup without navigating to a new web page.

However, reading your post it appears you wish to extract this
information from a third party site, not under your control. This is
not possible in javascript, it is possible if you have access to
server-side languages like php,perl,etc. Which will direct you to a
different newsgroup.

---------------------------------------------------------------------------
http://www.hunlock.com
$FA
Dec 12 '06 #2
On Dec 12, 8:49 am, pcx99 <x...@x.comwrote:

......
However, reading your post it appears you wish to extract this
information from a third party site, not under your control. This is
not possible in javascript, it is possible if you have access to
server-side languages like php,perl,etc. Which will direct you to a
different newsgroup.
That's what I was afraid of ... I know Javascript is *very* security
conscious. You answered my question nonetheless: I'm off to try a
solution using PHP (hopefully) or (if need be) Perl.

Thanks for a quick reply and a concise and helpful answer.

PB

Dec 12 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: jack | last post by:
Hi all, Suppose I have a routine to find the maximum of any *univariate* function f in the interval : double f(double x); double findmax(double (*func)(double), double a, double b); Now I...
0
by: Tobias Nilsson | last post by:
Hello, I'm trying to run a very basic winform dll (just some graphics to show it's executing) locally on my PC by calling it from a webpage... (not using IIS or anything else)... I'm used by doing...
0
by: Tom Clement | last post by:
Hi folks. I have a question about "Copy Local". We have quite a few projects in our solution (35) and some of them reference the very large "Microsoft.mshtml.dll". I was wondering why leave...
3
by: Robin Tucker | last post by:
I'm fetching a list of SQL servers on a domain using a function that returns strings, including "(local)" for the local machine (if it has an SQL server on it). Now, presumably in a different...
3
by: Robin Tucker | last post by:
Should I consider this to work in other locales? If theServer.Name <> "(local)" and theServer.Name <> "(localhost)" Then ' Can only use local machine in this version..... End If
4
by: soren625 | last post by:
What I am trying to do is grab a little snippet of data from a remote page based on user input in a form. Take a look at this page: http://www.qrz.com/kb2gsd What I want to do is: when a user...
7
by: babacrash | last post by:
Hello, I have designed a webpage mainly consisting in JavaScript code. It has to load an XML document's content when it is loaded so as to show a content depending on the XML data. Both the...
2
by: kirk | last post by:
I'd like to programmatically be able to determine if a network interface is currently in "Local Only" or "Local and Internet" access mode. Also I wasn't sure if this is only applicable to Windows...
4
by: Karl | last post by:
Does anyone have a sample of an .hta file. I need to put Access data in a local webpage. The data needs to be displayed in an html table.(like a continous form) So far I have the following but...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.