Retrieving Certain Text From A Webpage
Dec 27, 2010
For a personal project, I want to see if I can make a Greasemonkey userscript (or eventually a Firefox add-on) to list how far a certain ad on Craigslist is from where the user is (by the city listed beside the ad). My question is really just looking for ideas on how I can parse out the city's from the webpage text (with javascript or some other language?). Not even sure if this is possible.
The city's or ads aren't their own div elements or anything (nothing can ever be so simple) - but the city's listed are formatted by <font size="-1"></font>, and each ad is in it's own paragraph tag.. maybe I can use that somehow?
View 4 Replies
ADVERTISEMENT
Nov 23, 2011
I want to use the values of text boxes on my HTML webpage to create a webpage URL (like below):
<script type="text/javascript">
My text boxes are as follows:
Now this all works and the result webpage URL prints to id='ID1', but the big question is how do I use this resulting URL in another Javascript section as the src="?
For example:
View 14 Replies
View Related
Jul 20, 2005
I'm not sure why I'm having problems with this but if I try to retrieve the
value of a readonly text form I get back that the object is undefined.
The reason the text is readonly is because it's a date which I set via a
calendar javascript program (associated with a button) only so the user
can't put something silly in requiring validation.
The form send the data correctly when submitted it just doesn't seem to be
able to be read.
View 7 Replies
View Related
Feb 7, 2010
how Id be able to retrieve the text "Text I want to retrieve".
[Code]...
View 1 Replies
View Related
Feb 26, 2011
I am fairly new to javascript and I am wondering how I would load a text file that has a JSON formatted array stored in it?I can pass the array directly to the page via php though I want to be able to store the data and save on calls to the database and of course load the data dynamically to the page.
View 1 Replies
View Related
Feb 19, 2010
I am trying to create a chrome extension that can pass text from a text box to a webpage text box. Basically my company has an intranet site where you can search for an employee. The url does not display the search terms so i cant just append to it. Since I cant really work on this outside of work (its an intranet site) i have tried replicating it from home using the let me google that for you (www.lmgtfy.com) site.
View 2 Replies
View Related
Jan 16, 2011
I am using the SVG plugin. I have a simple test and I am unable to retrieve the x and y values of a text object.
$('#objID1', svg.root()).attr('x')
This returns as empty. Where as:
$('#objID1', svg.root()).attr('fill')
successfully returns the fill value.
HTML code:
<html xmlns="[URL]">
<head><title>SVG test</title>
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.7.custom.min.js"></script>
<script type="text/javascript" src="js/jquery.svg.js"></script>
<script type="text/javascript" src="js/jquery.svgdom.js"></script>
<script type="text/javascript" src="js/jquery.svganim.js"></script>
<script type="text/javascript" src="js/test2.js"></script>
<style>
#svgCanvas {
width: 200px;
height: 200px;
border: 1px solid #ff0000;
}
#svgAtts {
width: 200px;
height: 200px;
border: 1px solid #ff0000;
}
</style></head><body>
<div id="svgCanvas"></div>
<div id="svgAtts"></div>
</body>
</html>
Javascript code test2.js:
$(function() {
$('#svgCanvas').svg({onLoad: function(svg) {
//code
}}); });
$(function() {
var svg = $('#svgCanvas').svg('get');
var obj = svg.text(50,50,'Some Text',{id: "objID1", fill: "#FF0000", fontFamily: "Arial", fontSize: "24"});});
$(function() {
var svg = $('#svgCanvas').svg('get');
var string = 'fill = ' + $('#objID1', svg.root()).attr('fill') + '<br />';
var string = string + 'font family = ' + $('#objID1', svg.root()).attr('font-family') + '<br />';
var string = string + 'font size = ' + $('#objID1', svg.root()).attr('font-size') + '<br />';
var string = string + 'x = ' + $('#objID1', svg.root()).attr('x') + '<br />';
var string = string + 'y = ' + $('#objID1', svg.root()).attr('y');
$('#svgAtts').html(string);
});
View 2 Replies
View Related
Apr 2, 2011
Is it possible to have a text box input searching for the entered text on another webpage in the same way Find In Page would do? I have a webpage that I want users to input an item, and that this will open the targeted webpage and bring you to (and highlight) the matched item(s) like find in page does. Is this possible or is the easiest way to just make users open the link to the target page and just complete the find in page search there?
View 1 Replies
View Related
Sep 11, 2005
How would I access the source of a webpage? I would like to get the source,
then use a regexp to find text on a webpage. For example, retrieving a
counter, or some other text that dynamically changes. I'm implementing this
for firefox.
right now, i have a web page opening that contains that info, but i would
rather have a pop up alert() that shows that info.
View 2 Replies
View Related
Jul 10, 2010
How can I do that? How do I use the selector to select from other web pages other than the current page?
I know that you can select all p elements on the current page by doing this: $("p").doSomething But what if I want to select from another web page?
View 3 Replies
View Related
Feb 24, 2009
Is there a way of searching for highlighted words on a webpage?
View 4 Replies
View Related
Jul 8, 2010
I'm trying to write a macro, but I'm lost. So say if I have an array of keywords to check for on a web page,
var keywords=new Array();
keywords[0]="You are a cat";
keywords[1]="Are you a robot";
keywords[2]="Have a good summer";
How would I make a function that checks the currently opened web page for one of the specific keywords. And if that keyword is found, then execute some action - and if not, then execute some other action?
View 8 Replies
View Related
Nov 15, 2011
I maintain a website for a small local restaurant. I do this with FrontPage so I know very little coding.
I have an upload manager so the owner can remotely upload a txt or doc file of daily specials to a folder on the server.
I would like to put a java script into one of the web pages that would open and display this file on page load.
View 3 Replies
View Related
Jun 29, 2006
Im doing a webpage, which will call the window.open to link to another page. my code is like this:
<script>window.open("../../mySite/index.jsp?link=<%=link%>","_parent","status=yes,toolbar=no,menubar=no,location =no","true");</script>
bt when i view bak the page,
","_parent","status=yes,toolbar=no,menubar=no,location=no","true");
this line displayed in the page. wat happen to the line of code?
View 2 Replies
View Related
Dec 7, 2009
The red part of the code below doesn't work correctly, but I hope it shows what I want.
Code:
<html><body>
<div id="container" style="float:left;">
my<br> dynamic<br> contents
</div>
<script type=text/javascript>
var container = document.getElementById('container');
var containerHeight = container.clientHeight;
if (containerHeight >= 100) {
dispaly("big sideBanner");
} else if (containerHeight > 50 && containerHeight < 100) {
display("middle sideBanner");
} else {
display("small sideBanner");
}
</script></body></html>
I like to display "big sideBanner" on the webpage if containerHeight is 100 or containerHeight is more than 100 and "middle sideBanner" if containerHeight is more than 50 and containerHeight is less than 100 and "small Banner" if containerHeight is less than 50. How can I make it work?
View 2 Replies
View Related
Aug 19, 2011
I am trying to place text output from a url on another webpage.The output is the status of an alarm system.hash and mac info remove for security reasons.I would like to place these three outputs on another page.
View 2 Replies
View Related
Jan 4, 2011
I created a web page having textbox and an update button. My need is to display data in the text box when page is loaded. After that when I click on the textbox it will become an input textbox and can enter data. when data entered completely, click on the update button, after that newly entered data must be displayed on the text box. i.e same text box will be used for input and output data.
I created my web page using html. I knew that, by using ajax i can implement the above functionality. but i didn't get any idea to write the code.
View 4 Replies
View Related
Mar 14, 2009
I can't figure out the code to perform this task. I need to change the menu's text color with a mouseover on a webpage. The menu consists of 7 text links. Each one is a different color. The mouseover is to change the text link to orange while the other 6 menu items change to purple.
View 11 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
May 18, 2010
I'm try to set up a webpge that will play a live flash video on the left-hand side(got that part working) and display one slide of a presentation(jpg) to the right of the video. I would like to be able to control when the slide image changes by having some js check a text file on my server. The text file could contain something as simple as "Slide1.jpg". I will manipulate the text file with some code I've already written. Is there some simple js code I can put in my page that will cause it to check the text file every 5 seconds, and if the content of the file has changed, to refresh the image on the page with the new image? I'm try to get away from the "clicking" sound that is caused by doing a simple refresh of an Iframe.
View 3 Replies
View Related
Jan 21, 2004
I have a form which calculates values and gives the user a total depending on their selection in the drop down box. At the moment the value is displayed in a text field and I have got all the javascript to do this.
What I would ideally want is to embed the total in the page, rather than a text field. The total appears to the user like it is normal text in a page, only it will update when the form values are changed.
I presume that I want document.write to do this? Does anyone know how I could do this/ or if there is a page that does this sort of thing where i can 'borrow' the code?
View 3 Replies
View Related
Aug 10, 2010
It launches in IE and give the user instructions, then at the click of a button, launches my setup.exe. I want my webpage to launch setup.exe then go to another webpage on my CD, congratulations.html, which says "installation is complete etc". Here's what I am trying to do through JAvascript. It doesn't work. Should the first instruction be flushed in order for the 2nd one to work?
[Code]...
View 7 Replies
View Related
Mar 5, 2011
I am trying to display a webpage from another domain and tried to access its elements and I am facing issues with this.
I tried using "iframes" and am facing cross domain issues.
All that I want to do is, set and get the attributes of the elements of the webpage from the other domain (eg: set text field value, get dropdown box values, click button etc)
Is there a way to get this job done?
I thought of browser addons however it will be a browser specific solution.
View 14 Replies
View Related
Oct 23, 2011
1st post: how to force an iframe to reload? 5th post:how to force an iframe to reload? i tried the first way, and this doesn't work, then i try this:
[Code]...
View 1 Replies
View Related
Nov 23, 2009
Could anyone know the script code for a WEBPAGE ON TOP OF A WEBPAGE? The site was not working anymore, so I can't tell you the link. This is what I saw, When I visited the site (Mainpage) There's just a Welcome Image that shows CLICK HERE TO ENTER. After clicking the link, a loading faded icon appears on top of Welcome Image covering that Welcome Image with Webpages, it's like popping to the center of the page. I don't know if someone of you could understand me. It's like Page on TOP of another Webpage without leaving the 1st page.
View 1 Replies
View Related
Jul 23, 2005
I have:
1 form on the page. (no name, no id value set.)
3 hidden form elements named: catalog, vwoidc, oid
!!! I can only include the javascript right after the body tag. The
form is found near the end of the loaded page.
<form action="actionURL" method=post>
<input type=hidden name=catalog value=store>
<input type=hidden name=vwoidc value=69a6e1deb02417250691>
<input type=hidden name=oid value=60323></form>
Everything I've tried needs to have the javascript executed after the
page has been fully loaded.
View 15 Replies
View Related