Hi, I have a table that looks like the following.
<tr>
<td>Link Name</td>
<td><a href="#" class="edit">Edit</a></td>
</tr>
At the bottom of the table I have the following.
<tr>
<form class="hidden create">
<h3>Add Link</h3>
...
<input type="hidden" name="form_id" value="{menu-id}" />
</form>
</tr>
To avoid a mas...
All the examples of jQuery.append() seem to take an html string and append it to a container. I have a slightly different use case. My server returns me an XML that contains HTML text to be displayed, something like:
<event source="foo">
<contents>
<h1>This is an event</h1>
This is the body of the event
</content...
This is related to an earlier question. I try to append HTML DOM returned in an AJAX response to an existing DIV. I see all the text, but it seems all markup such as bold, italic, etc is lost.
My AJAX (XML) data is like so:
<event source="foo">
<contents>
<h1>This is an event</h1>
This is the body of the event
<...
I have a variable to the button below that I would like to replace:
<script type="text/javascript">
var btn = window.document.getElementById('btn_fb_1');
</script>
<button id="btn_fb_1" type="button">Log into Somewhere<br />(Joe Doe)</button>
Using the "btn" variable above, how to I replace the entire element with just text like thi...
Hi all,
Could any one explain me the difference between IE and DOM Standard event model in simple terms ?
Thanks.
...
Ok so i have this page. As you can see on this page I have a header that if you click on the three little dots on the right a new image and movie is displayed. this works great at the moment. The problem is the client now wants the page to rotate and I have tried this in the past but the problem arises when someone clicks on the movie an...
I am able to do this:
<div id = "myDiv">
<div class="foo" ></div>
</div>
myDiv = getElementById("myDiv");
myDiv.querySelectorAll("#myDiv > .foo");
That is, I can successfully retrieve all the direct children of the myDiv element that have class .foo.
The problem is, it bothers me that I must include the #myDiv in the selector, bec...
Could somebody explain why the following simple script doesn't work in Firefox and how can I fix it?
<script type="text/javascript">
var w = window.open("a.php");
w.document.write("hello");
</script>
Thanks much
...
I have a strange problem, I am trying to implement drag and drop using dojo, this all works fine. However I need to attain the id of all divs with a certain class, I have been unable to do so using the dojo.query method e.g. :
var totalNumDays = dojo.query(".shiftDropper");
console.log(totalNumDays.id);
This results is...
If I only have a reference to document.getElementById('btn_test'), how can I get a reference to that first checkbox input element using only Javscript. Maybe a parent.parent? What is a safe way?
<td>
<input type="checkbox" name="text_rnd_input"/>
<label>
<button id="btn_test" type="button">
</button>
</label>
</td>
...
Hello,
I use dom to add inline styles directly to the head of a web page via Javascipt. The function goes like this:
// Create internal style sheet
function createStyle(styleText, styleName) {
// Create the node
var cssNode = document.createElement('style');
cssNode.type = "text/css";
cssNode.rel = "stylesheet";
cssNode.titl...
Hello
I need a quick help for a tricky problem that is literally driving me crazy.
String example = "<digitalObject>" +
"<title>title</title>" +
"<creator>Name</creator>" +
"<location>link</location>"+
"<relatedAsset>related realife object</relatedAsset>" +
...
For a class project, I'm trying to write a simple RSS reader for my Java class. I am trying to walk the DOM tree just to get the experience doing it although I know there are better more efficient ways and tools. I have a ReaderObject that gets the basic title, link, description, and a List to hold RSSItem objects that have the instan...
I'm trying to use jQuery inside a Firefox extension, and actually want to use jQuery to manipulate the DOM of the current page, as opposed to the context of the XUL file. Thus, I load jQuery in my XUL file, and pass it to some of my scripts in a sandbox (using the Greasemonkey extension compiler http://arantius.com/misc/greasemonkey/scri...
Hello.
I've been having a problem with Google maps API v.3.
I have my canvas declared like
<div id="map_canvas" style="width:
50%; height: 50%; margin-left: auto;
margin-right: auto">
and in my Javascript function
var myOptions = {
zoom: 8,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var mydiv=docum...
I use DOM parser to mine the data.Problem is that i cannot manage to get the "url=" "length" and "type" tag that is inside the "enclosure" tag
<item>
<title>blah blah</title>
<description>blah blah</description>
<enclosure url="THEURL" length="LENGTH" type="TYPE" />
</item>
Here's the code that i use : Can anyone po...
I'm dynamically creating and destroying textareas for this purpose. However, when I create a textarea and then an instance of it in tinymce--then come back to the page again, it doesn't work. I've found that the solution is to simply remove any existing instance of that same name, but I was wondering if it's possible to just do it at sta...
When using ExtJS I've noticed a property "Related Target" for an event. Googling also reveals that this term is used in other DHTML related contexts, not only ExtJS. So what is this "related target" and how does it differ from the normal target (which is another property of the event object)? On this subject google revealed nothing.
...
In the 2006 version of DOM events level 3 specification there is a chapter "Event groups", but in the current version there is none. What happened to this chapter? Was it intentionally removed? It would be very helpful to have (partially) ordered event handlers list.
...
Hi all,
I am in the following situation. I am trying to convert a messy scraped html code to a nice and neat xml structure.
A partial HTML code of the scraped website:
<p><span class='one'>week number</span></p>
<p><span class='two'>day of the week</span></p>
<table class='spreadsheet'>
table data
</table>
<p><span class='two'>anoth...