I cannot seem to get this to work. Any thoughts?
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Select Video Test</title>
<script type="text/javascript">
function selectVideo(){
var urlString = "http://www.mycookingsite.com/";
var selectedV...
I am trying to pull an exact table during a "web scrape."
Used cURL to pull page into $html, which succeeds fine.
Used Firebug to get exact XPATH to the table needed.
Code follows:
$dom = new DOMDocument($html);
$dom->loadHTML($html);
$xpath = new DOMXpath($dom);
$summary = $xpath->evaluate('/html/body/table[5]/tbody/tr/td[3]/table/t...
I want to detect in a script, which could be deployed beyond my control, whether the page was delivered with a HTTP status of 200, 404 or 500 etc.
This can't be done, right?
...
I have this code to show a map using the Virtual Earth API:
<script type="text/javascript">
function GetMap() {
var map = map = new VEMap('myMap');
map.LoadMap(new VELatLong(47.6, -122.33), 10, 'h', false);
}
$(document).ready(function() {
GetMap();
});
</script>
<a href="#" onclick="$('#myMap').togg...
I would like to make a simple but non trivial manipulation of DOM Elements with PHP but I am lost.
Assume a page like Wikipedia where you have paragraphs and titles (<p>, <h2>). They are siblings. I would like to take both elements, in sequential order.
I have tried GetElementbyName but then you have no possibility to organize informa...
In PHP I would like to get the text value of the customer name tag. I write this code but this does not work. Would you please help me with this? Thank you
$customerName = $dom->get_elements_by_tagname("item");
$customernameValue = customerName[0]-> first_child()->node_value ();
...
I looked at JQuery documentation, read FAQ and saw a lot of examples. It looks like to get a set of all elements in the document that is described by a rule, you code
$(rule)
where rule is a string whose syntax is described here. Document seems to be a hidden input parameter. Can I do the same with a subtree of the DOM? If I have a D...
for an element in DOM,such as an "A" element,how to replace it with a "span" instead?
...
How can I retrieve the mouse location outside of it's assigned event handler function
For example, if Event.MOUSEMOVE = somefuction, how do I say...
someOtherFunction( maybeSomeParams )
{
getCurrentMouseLocn();
}
or
someOtherFunction( maybeSomeParams )
{
mouseXLocn = ?;
mouseYLocn = ?;
}
...
Several of years ago, I added "smart quoting" to a web forum. Basically, user selects a part in previous conversation and clicks a button to quote it. Script gets the HTML of the quote and goes up the DOM tree to figure out who said that.
I could only do it for IE, although I remember trying hard. But then, there was no stackoverflow.c...
How do I create a DOM element in JQuery and fade it in to show up, instead of having it show up immediately?
I try this:
var myDiv = "<div>Hello!</div>"
$("somePlace").after(myDiv).fadeIn('fast');
but this doesn't work, since the .after(myDiv) makes it popup immediately. Any solutions? Thanks!
...
I have a requirement to implement a "simple" web-based form designer that allows "simple" users to create their own web-based forms. I've come across these things in rich clients, such as Outlook and Acrobat, but my requirements are much simpler and must be web-based.
Pretty layout, custom validation, complex fields and types are simpl...
Hello.
I want to find the name or ID of a element where I got top and left position.
I know how to use jquery to find the position of an element (Hovering over the div will trigger that position text will appear on screen):
$(".item").hover(function () {
var eleoffset = $(this).offset();
$("#mouse").text("Mouse - Top: ...
I need to be able to replace the entire document content with a response obtained from an ajax request.
I have tried assigning to document.body.innerHTML and also tried using document.write().
While both of these are functional on desktop Safari, I need a solution for the iPhone/iPod Touch. Attempting to modify document.body.innerHTML p...
So far, this is the story of a failure, and any advice is welcome. I tried the following:
XMLStreamReader to Document using JAXP with Saxon
The code:
JSONObject obj = new JSONObject("{\"alice\":{\"bob\": \"a\"}}");
AbstractXMLStreamReader reader = new MappedXMLStreamReader(obj);
StAXSource source = new StAXSource(reader);
Document do...
In our website,a media file is being played in the HTML when it loads with the help of flash. We encounter a problem in firefox when autoplay is enabled.
It seems that when the HTML loads some binary data from streaming corrupts the HTML header and hence is not able to detect the MIME-TYPE and so asks to save UNTYPED-BINARY data.
How d...
I'm trying to use Ajax to fetch an HTML page and then pull out a div by it's ID, and insert that DIV into the current page. So the current page loads (via Ajax) a second page, pulls the div out of the Ajax response and inserts into the current page. However I am at a loss as unless the response is text/xml, I cannot use any DOM functions...
Hi,
In one of the applications we are developing we do lot of XML processing. Currently we use DOM and XPath for most of the processing and we are not much happy with the performance.
At the moment we are considering of moving XML processing logic to LINQ and our initial investigations suggest LINQ performance is much better than DOM....
Hello
I have been asked to write an app which screen scrapes info from an intranet web page and presents the certain info from it in a nice easy to view format. The web page is a real mess and requires the user to click on half a dozen icons to discover if an ordered item has arrived or has been receipted. As you can imagine users find...
Hey,
I'm trying to make some simple XML with Java and org.w3c.dom, but I got stuck when I try to append a child to a child, something like this:
<root>
<child>
<childOfTheChild>Some text</childOfTheChild>
</child>
</root>
I tried quite some variations of this (like first appending the child and than creating child...