Navigating Text String That Contains HTML Of A Page As DOM Object?
Mar 21, 2006
First, with AJAX I will get a remote web page into a string. Thus, a
string will contain HTML tags and such. I will need to extract text
from one <span> for which I know the ID the inner text.
Is it possible to access in this way "string variable".getElementByID()
PS: Just thinking of a proper/efficient way to extract the information
from such a string. I am open to other ideas. I could load that page in
IFRAME and get my access to DOM that way, yet probably it is not an
after i've built an element, can i convert that element to html? the current method i'm thinking is to append this element to a new <Div> and call the Div's innerHTML but it feels rather dirty. is there a better solution?
<li class="arrow"><a href="#dates">About</a></li>
However, I want to link to another html page. I find I'm unable to do so. The following attempts don't work; that is, clicking on them will make the row change color, but won't change the page:
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.
There must be some fundamental difference between changing an image or iframe "src" and changing an object's "data" that totally escapes me because the above script won't update/refresh/reload/change the existing embedded page (page1.html) to page2.html.
I have run the script with an "alert(document.getElementById('thing').data)" tacked onto the end of the above script, and it does, in fact, return "page2.html" in the dialogue box. So, maybe, I just need to refresh the object (without reloading the whole page!)?
I've noticed that <object> is usually used with applets and flash and sound and there seem to be commands to "run" them, but I can't find any terms to handle updating an embedded html document. Maybe there really just isn't any way to do this yet aside from iframe?
Im having to create an html page that displays the current date that i need to extract from a .JS file eg: daysOfTheWeek: [Content.dates.sunday] I have to convert this into a string to work on my HTLM page...So far i have managed to get this far
<h4>It is now </h4> <span class="dateHolder"></span> </head>
My background is C++ and C#. Using basic selectors and filters in jQuery is not a problem for me. My problem is finding the right jQuery code to capture a live html page and assign an object which contains all the html text I just captured... then I can use the object to apply basic selector and filter functions to create another page.
How can i pass the dom object to java and evaluate the scripts contents from java.
I have be days searching the web for a solution but have found none that suits my purpose.
I've got a requirment to copy some content from an HTML page. It is a failry lengthy page and we want to give the user/reader the ability to click a button and have a section of the page copied to the clipboard, or at the very least selected so they can just right click and copy it. The issue is that text/content to be selected/copied is not in a textarea.
I've got it in a div right now and can get the innerHTML of the div and set a text area to that but it comes in with all of the HTML tags and so when I copy it to notepad I get all of the tags which is what I dont want.
Has anyone done this before? I've tried numerous things to get it to work and have had no luck.
I want to create a body on html page , i want to add all the functionalities , like change of font size and color when i create the document. and when i read the document in view mode it will show the field in the entered format.
I wanted to know how can I check for a specific HTML tag or user defined TEXT and delete it when the page loads
Whenver the IE loads the page my company add its COMPANY NAME in my office on any page so what I want to do is to check for my company name b4 the page loads and remove the company name and then load the page.
suppose i have a html page with text, links and what ever else a page contains. On selection of Text on the html page i want to raise some event that will do something. But what that event is known as? By text selection i mean placing mouse pointer to some text and left clicking and moving the mouse either to left or right. Now when user selects some portion of text and releases the mouse's left click button a event should be raised. Obviously that event should know what was the selected text. So is it possible ?