I want to write a script that will read a .php file on a remote
server and print to the current page a portion of the text contained in
the remote file. I am just wondering what the best method is for
reading from a file in this case - the file is only a few bytes long.
I've seen a tutorial or two that only tangentially addresses my
problem, and even then each one has varied greatly as to which object
they utilize.
I am trying to read an XML file from a web source to display on my site. I can't get it to work ..GET seems to come up with an error - I tried crossDomain: true with no luck and have tried on a local and web server.
What I want to do is access a remote web page via DOM and read some of the data by loading it into an IFrame. However I get an access denied message. Apparently you cannot have read access to an IFrame if it contains a foriegn domain.
Originaly my plan was to manipulate the information via DOM from an Iframe so if thats not an option, is there a way to store a web page in a text var and read it via the DOM that way?
Or perhaps another way? What do you guys think is the best way to accomplish this?
I've managed to read from a local database using only javascript and the DAO ActiveX object, but I can't make it work with a remote database. When I change the connection string from "C:..." to "http://..." it doesn't work any more. Any suggestion?
I have been working on a script that can be placed on any of our clients websites. It is a mix of PHP and Javascript.it calls the php script on my server which takes their request, processes it and provides a file ready to be read on my server. This file will be in multiple formats depending on how we have confirmed with the customer so it could be xml , html, csv etc.The problem I am having is that I have used PHP's file_ get_contents function to obtain the html of the file this script creates however when i try to write the contents out to the screen using javascript I get errors.Has anyone ever come across this issue and does anyone have any advice on how to actually take the contents of the file (stored on an external website) and displaying it?
I'm trying to create a simple checkout system that utilizes cookies to pass information from page to page. Currently, my entire script works fine except for the read cookie portion. I cannot figure out what is wrong with it. It has been validated and the syntax is fine; it just doesn't work. I use the function with the onload call on my html file such as:
Im wondering if there is any way to access and traverse through a remote web page. im trying to traverse through a remote web page from a diferent domain so i can display some text from that page to users. is it possible to do it using javascript if so how else what is the best way to do this with out keeping the user waiting for long.
I'd like to save a single page automatically. The page uses javascript, and therefore I can't seem to use links, elinks, lynx, w3m or curl (I've tried them with spidermonkey but it keeps telling me to enable javascript) to do so properly, it always saves everything except the javascript rendered output.
So I think the only what to do it would be in a web browser. So, say for intstance, I want to save the the main page, [url] and have it automatically save to my C:google.htm. How would I do that? Is this possible?
I'm trying to set a variable which a remote page can access. I can do this, but I need to set this variable inside "window.onload = functio(){". When I do this the remote page can't access it. This is a breakdown of what I'm doing:
I created a page a set of tabs, each tab loads an external page. The problem is that when I click on each tab, the external page contains script jquery and will not run.How I can do to upload the script to each page there is external?
I can use the jQuery ajax function to grab all of the html from a remote page, and that's cool. What I would like to do is to grab only a particular element of the remote page, not the entire page. Is this possible? I've tried some variations of the ajax 'url' param, but I haven't gotten anything to work yet.
I'd like to save a single page automatically. The page uses javascript, and therefore I can't seem to use links, elinks, lynx, w3m or curl (I've tried them with spidermonkey but it keeps telling me to enable javascript) to do so properly, it always saves everything except the javascript rendered output.
So I think the only what to do it would be in a web browser. So, say for intstance, I want to save the the main page, google dot com and have it automatically save to my C:google.htm. How would I do that? Is this possible?
I've used about everyone i've found online, with no success.The problem seems to be that these tooltips don't use the fully qualified domain to include pages just tip1.htm instead of somedomain.com/tip.htmTrying to create a "plugin" of script that people coming to the site can cut and paste into their own page and that code will show the content of my remote page.
I'm trying to read another site which is on ssl. It has data that changes daily. I do not own the other site. I don't have curl or ssl support with my providor. Is there any way I can do it with Javascript or PHP?
I download the jquery library, when i include it as such:
It loads but i always get some sort of error in the functions in the page or something...as if the js is loaded but not correctly or as if it's missing, even though the download itself is correct
If i change the include path to (which is the exact same file i downloaded):
Everything works fine i am thinking maybe it could be something that has to do with encoding maybe? am not sure...any clue? it's only happening with the jquery JS files, the rest are working fine.
There's a thing I would need for my website: I want to include an image from an other site. But it's url is changing every day because the image changes every day. (That's the site: [URL]
How can I find out the image url with javascript and show it on my website?
Is it possible to read a web page on some web site that contains a form. Then identify the fields in the forms. Then fills the fields with my data. and then submits the form as it submitted normally. I need to do this to automate for my final proyect , i need to fill many web pages remotly
I have nested tabs in jquery tabs which are pretty simple to do if we want static jquery tabsbut what if we want nested tabs that the remote page should decide what would be the tabs.or in other words i want nested tabs in a remote page (or ajaxified) For example i m calling this page(remote page) through tabs
I have a programing problem that have been around for ages. I have search on google using several expressions and words and after hours of digging i'm still unable to do it.I would like to get a value from a HTML page hosted remotely with an inconstant value. Then define this value and name as a javascript variable and apply or show in my page.P.S. Is there any way to make a domain lookup in javascript? I mean a user enters a domain and the script converts to an ip and shows to the user. If not thanks, probably it can only be done in the server side...
I've got my script hiding the "Invoice" radio button; however I can't figure out how to hide the text next to it. What would be the best practice for this?
I'm using jQuery to hide the radio button:
Code: <script type="text/javascript"> $(document).ready(function(){ var invoiceField = $("input[value=Invoice]");
[Code]...
Is there a good way to grab that text after the radio button, wrap some tags around it, and then hide that too?
I would like to find some direction or help to solve an issue I have.I would like to find a way to search for a string of content on my webpage and return the string, or at least part of the string into the URL...Example of the content on my page:-----Welcome, John Adams Log OutWelcome to your own content, based on your settings provided. Feel free to download the content you need.Fairly straightforward. Now I would like to create a function that will look at the page and "copy" the string of content beginning with "welcome" and ending with "out"Next, I would like to remove the "welcome," and "log out" and have the name remain.Then, post the name into the URL to be passed onto the next page for me to use as more ersonalization/dynamically driven content; Such as:
I'm trying to accomplish the following, preferably using jQuery, find this string on a page (it occurs only once).. 'BC-' and then, depending on the page i'm on either - add a simple <br/> tag before it, or enclose in it within a span tag with a class. adding the span would be more complicated because 3 numbers follow the BC- ex: BC-103.
The XXX function here would interpolate the values of any variables named with a @ prefix into the string. Why @? Why not?
So using my favorite JavaScript console (FireBug), I typed the following and ran it:
x = "hello world"; y = 42; z = "--@x/@y--"
z = z.replace(/@(w+)/g, function (dummy, v) { return eval(v); });
alert(z);
And it works. The alert box shows "--hello world/42--" as expected. Okay, so now let's turn it into a function:
x = "hello world"; y = 42;
function XXX(s) { return s.replace(/@(w+)/g, function (dummy, v) { return eval(v); }); }
alert(XXX("!!!@x~~~@y!!!"));
And again, it works. The alert box shows "!!!hello world~~~42!!!" as expected. I should be able now to just drop this *same* code into a <scriptsection of a web page, right?
Wrong. If I take the *same* code as my second example and plop it in a web page, the alert does not show the same thing as when in FireBug's console. It shows the same string passed to XXX, unchanged.
Other experimentation tells me that when placed in a web page, the anonymous function to do the eval call is never invoked, which suggests that the regular expression didn't match.
I've only tried this in FireFox 2 and IE 7, but if it doesn't work properly in either of those, I really don't care about the other browsers.
My guess is there is a difference in the execution environment of FireBug's console (or likely, any JavaScript console) and the execution environment of a web page. The questions are what is that difference, and how do I make my XXX function work properly?
I want to - after the page has loaded - detect a text string in the code..Simply put I want javascript to detect a text string in the source code and return it to me -- AFTER the page is fully loaded.