If I were to remove my CSS stylesheet and set all the properties via a JavaScript file, would that be possible? That is, would there be anything I couldn't access via the JS DOM API?
...
We've got some data (10-50 columns, hundreds of thousands of rows) that we usually visualize in excel as a line graph or stacked bar chart. Users want to be able to zoom in and out of the graph to get down to the individual samples, but these kind of operations really bring Excel to its knees. I'm thinking about embedding the data into...
Hi
I am creating this JS function that creates an element
The function takes two parameters strName and objAttributes
function createElement( strName, objAttributes )
{
var elem = document.createElement(strName);
for ( var i in objAttributes )
elem.setAttribute(i, objAttributes[i]);
return elem;
}
This works fine in Fx, ...
WatIn provides great functionality for programmatic access to the displayed parts of a Web page.
I want to access the head part of the page, spedifically the META tags. Watin allows me access to the TITLE, but AFAICT nothing else. There is an InternetExplorer property which allows access to ShDocVw.InternetExplorer. I suspect this mi...
Hey,
I am working with HTML which has javascript links like below:
<a href="javascript:openExternalLink(5542, true, 'http://www.websitedomain.com')">Links Text Here</a>
I need to replace these with standard anchor tags like so:
<a href="http://www.websitedomain.com">Links Text Here</a>
What would be the best solution to achi...
How do I access the classic Internet Explorer COM automation object for a running instance of Internet Explorer? That is, if I have Internet Explorer open in multiple windows, how do I associate the COM object corresponding to one of those windows with a variable in Powershell, from within Powershell? The closest I have come to doing thi...
Consider the following HTML. If I have a JSON reference to the <button> element, how can I get a reference to the outer <tr> element in both cases
<table id="my-table">
<tr>
<td>
<button>Foo</button>
</td>
<td>
<div>
<button>Bar</button>
</div>
</td>
</tr>
</table>
<script type="text/js">
$('#table button').clic...
For example consider the following xml
<root>
<childNode attribute1="value1">
<grandChildNode attrib1="val1" attrib2="val2">some content1
</grandChildNode>
<grandChildNode attrib1="val1" attrib2="val2">some content2
</grandChildNode>
<grandChildNode attrib1="val1" attrib2="val2">some content3
</grandChild...
I'd like to find a better way to output console messages to an HTML page. This method seems to be pretty slow.
<html>
<title>Logging test</title>
<head>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function log(s) {
if(!log.start) {
var date = new Date();
log.count = 0;
_log("0", "log() started at " + ...
In javascript, how would you check if an object is actually visible. I don't just mean checking the visibility and display attributes. I mean, checking that the element is not
visibility:hidden or display:none
underneath another element
scrolled off the edge of the screen.
EDIT: For technical reasons, I can't include any scripts. I ...
I'm trying to clone a list item, and then append it to the bottom of that cloned list item, note that it should be below the list item being cloned, not at the bottom of the list as I can do that myself. The purpose is to use it with jQuery.ui sortable.
Everything is working fine, in fact I can even get the cloning and the appending ri...
There are some attributes in HTML which are "boolean" - browsers treat them as "true" if they are present, regardless of the value. An example of such an attribute is selected on the <option> tag. Another is checked on <input type="checkbox">.
If you have a call to setAttribute() for such an attribute, there seems to be no value you can...
Hello,
I am writing an application in which the user can browse the web with tabs (like a browser).
Using XULRunner/XPCOM/Javascript, I am able to know when a new document is loaded and so display the title of the page in the tab.
My problem is when the user clicks a link that loads a page IN A NEW WINDOW. I don't know how to catch th...
Whats the quickest way to convert a doc like:
<customermodel:Customer>
<creditCards>
<cardNumber>@0</cardNumber>
<provider>@HSBC</provider>
<xsi:type>@customermodel:CreditCard</xsi:type>
23242552
</creditCards>
.
.
So that the elements with @ become attributes for the parent element.
ie get...
I'm performance-tuning my code, and am surprised to find that the bottleneck is not dom node insert, but selection.
This is fast:
var row = jquery(rowHTML).appendTo(oThis.parentTable);
but the subsequent getting of an element inside "row" is slow:
var checkbox = jquery(".checkbox input", row);
I need to get the checkbox in every ...
I'm using the DOM to manage a JSON response from an AJAX function I'm running. The script I'm writing needs to be completely portable, so I am defining the styles for the created elements on the fly (meaning, no linking to an external CSS, and no providing CSS in the HTML doc itself, because I won't have control of the doc).
I'd like to...
Hi,
My DOM looks like:
<div id="blah-1">
<div class="class1">
<div class="class11>
<a href=""><img src=""></a> <b>blah</b>
<a href=""><img src=""></a>
</div>
</div>
</div>
I have to change the source of the 1st or sometimes 2nd img.
I am using jQuery and don't have a strong handle with selectors just ye...
I am new to XML, and DOM. I guess I need to use DOM API to find go through every non-text nodes once, and output the node name.
say I got this example XML from W3C
<bookstore>
<book category="cooking">
<title lang="en">Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
<page pa...
Are there good and advance books on DOM, the Browser , JavaScript techniques? I loved Pro JavaScript Techniques by John Resig and JavaScript: The Good Parts. Are there more?
...
I thought this might be a fast way to remove the contents of a very large table (3000 rows):
$jq("tbody", myTable).remove();
But it's taking around five seconds to complete in firefox. Am I doing something dumb (aside from trying to load 3000 rows in to a browser)? Is there faster way to do it?
...