Okay, ridiculously simple question, but it is doing my head in so any help would be appreciated!
I need to return a value to a form field, the value is returned in an iframe that is in a popup window.
So, I was thinking something along the lines of
window.top.parent.form.field.value = 'new value'
But that just gives me an error, any...
Hi I am new to JQuery.
I have a link
<a>href="http://www.ittesters.com></a>
I would like to be able to append the following to the end of the href
?iframe=true&width=70%&height=85%
I also need to insert an attribute
rel="prettyPhoto[iframes]
I would like this to happen when the user clicks the link not on page load.
I...
I have been using cloneNode in Firefox and it is working fine. But in Chrome it doesn't work as I expected. The cloneNode method does clone the node but it doesn't clone the value of the node if the node is file(<input type="file">).
Anyone know how to fix this problem?
...
Hey guys i have a formula the percentage of cals_in vs cals_out (out of 200%)
i created a scale to show the difference in the values in terms of percentage. The problem is I wanna convert the difference in terms of pixels height to move the scale up or down
function setScalesToValue(fValue) {
document.getElementById("cals_in").styl...
After answering this question I am left wondering why removeChild needs a parent element. After all, we could simply do
node.parentNode.removeChild(node);
As the parent node should be always directly available to the Javascript/DOM engine, it is not strictly necessary to supply the parent node of the node that is to be removed.
Of co...
I have been playing around with Scala/Lift/Comet/Ajax etc. recently. I came across a problem which boils down to this:
Summary
I want to update a specific div (by id) when a certain event occurs. If the div does not exist yet, it must be created and appended to the HTML body.
Currently I cannot get this to work when using the Lift fra...
The javadoc for the Document class has the following note under getElementById.
Note: Attributes with the name "ID" or "id" are not of type ID unless so defined
So, I read an XHTML doc into the DOM (using Xerces 2.9.1).
The doc has a plain old <p id='fribble'> in it.
I call getElementById("fribble"), and it returns null.
I use ...
Since version 1.4 of jQuery; you have been able to create an element using an object literal, defining the elements properties...
$("<div />",
{
id: "test",
name: "test",
class: "test-class"
});
On top of assigning a few properties to an element; I'd like to add some in-line styles. Is this possible, using the object liter...
Hi All!
How DOM is loaded in a html page?
First is load the all html tag ( ) and inside of this element is created an other element and so on or first is create followed by ... and finally, the closing tags are added?
Thank you!
...
So, if I have HTML like this:
<div id='div'>
<a>Link</a>
<span>text</span>
</div>
How can I use JavaScript to add an HTML element where that blank line is?
...
Java, Xerces 2.9.1
insertHere.setAttributeNS(XMLConstants.XML_NS_URI, "xml:space", "preserve");
and
insertHere.setAttributeNS(XMLConstants.XML_NS_URI, "space", "preserve")
both end up with an attribute of just space='preserve', no XML prefix.
insertHere.setAttribute( "xml:space", "preserve")
works, but it seems somehow wrong. A...
Hi guys suddenly I have no experience with java and html parsing and I really need it...(possibly from http://www.uefa.com/teamsandplayers/teams/club=52280/domestic/index.html)
I want a simple way to convert an html website to xml document(fetch,convert,parse) or an easy alternative way to do it...
ps:if you know any alternative FREE r...
So for example if we have a flash video already buffered and playing, or an autocomplete active with input, focus, and a dropdown visible (and maybe even loading something) but only have HTML of the full document and a copy of the HTML earlier, how can we merge them into the live DOM without the user's state being interrupted?
Ordinaril...
I have been searching for more than 1 hour with no success. Is there a pure CSS way of emulating a frameset? I mean, really emulating it. I have found some interesting stuff where you will have fixed top and bottom blocks, but the scroll bar for the content is the regular browser body scrollbar. What I need is a scrollbar only for the co...
Working on an idea for a simple HTMLElement wrapper I stumbled upon the following for IE and Chrome:
for a given HTMLElement with ID in the DOM tree, it is possible to retrieve the div using its ID as variable name. So for a div like
<div id="example">some text</div>
in IE8 and Chrome you can do:
alert(example.innerHTML); //=> 'some...
jQuery: how to change tag name?
For example:
<tr>
$1
</tr>
I need
<div>
$1
</div>
Yes, I can
Create DOM element <div>
Copy tr content to div
Remove tr from dom
But can I make it directly?
PS:
$(tr).get(0).tagName = "div";
results in DOMException.
...
I am logging into Craigslist with CURL to scrape the status of my posted listings. The problem I encounter is the transfer of HTML from CURL $output to file_get_html. While Craigslist statuses are actually nested inside TR elements, I just wanted to test the most basic functions to see if things were getting passed through (i.e. link s...
Is there a way to delete properties of DOM elements? I'm using a widget that upon rendering itself adds tabindex attributes to certain nodes. I'd like to remove them because they cause unwanted visual changes.
I tried the following which does not seem to have any effect (tabindex stays the same):
delete domNode.tabIndex;
domNode.tabInd...
kindly check the CODE**
<html>
<head>
<title>DOM ADD?REMOVE UL-LI..... NODE DEMO 09/08/2010 </title>
<style type="text/css">
ul{margin: 0;
padding: 0;
left: 20px;
width: 90%;
border-bottom: solid 1px #d09800;
}
li{
color: #333 !important;
background: white;
text-decoration: none;
}
#menu li{
height:15px;width:90px;
cur...
My javascript CODE
var TDCount = 3;
var i=0;
function insertTD(){
var possition=document.getElementById('elmnt_pos').value;
if(possition=="")
{
possition='a';
alert('Enter a number!!!');
}
if(isNaN(possition))
{
alert('Enter a number!!!');...