In this case I have a containing an iFrame that has an editor, mooEditable. I clone the element with IDs, destroy old one and insert new one where needed.
Javascript component doesn't work anymore at this stage. If there is a generic way to do this, it would be terrific if you share it.
TIA
...
this problem is so weird.
i have used jquery to link a specific id to an alert("hello").
$("#submit_reply").live("click", function() {
event.preventDefault();
alert("hellooooo");
});
now in safari when i click it works. but when im using firefox its not working. the submit_reply (a submit button) refreshes the whole page. tha...
CSS code:
p.myparagraph {
color: yellow;
}
Assume that I've turned the color of <p> elements that use the myparagraph class to red. Is there a way to reset all style properties of paragraphs using this class (not limited to color) to their CSS-defined defaults?
...
I'm trying to include some (effectivly) static XML data in an HTML file, and then parse it out with JavaScript. The test case below works fine in Firefox, Opera and Chrome (I get the expected list of nodes and depths), but fails in IE8 (all the nodes are at the same depth, and end tags are included in the node list).
Question: How do I ...
I need to add prototype and then add scriptaculous and get a callback when they are both done loading. I am currently loading prototype like so:
var script = document.createElement("script");
script.src = "http://ajax.googleapis.com/ajax/libs/prototype/1.6.1.0/prototype.js";
script.onload = script.onreadystatechange = callback;
document...
In the following code, the alert works fine and prints "DIV : IFRAME" as it should however it then says that cNs[1].childNodes[1].document has no properties.
Html:
<div id="WinContainer">
<div style="display: none;"><iframe id="frame1" name="frame1"></iframe></div>
<div style="display: none;"><iframe id="frame2" name="frame2"></ifram...
I'm creating a new mashup on top of Google Maps. It's simple enough that I chose to use V3 to provide longer life span.
However, there's some special needs that Google Maps infoWindow doesn't provide.
I've positioned my custom infoWindow with marker.projectionContainer.pixelPosition. I get correct position after zooming, but dragging d...
I'm having some issues with the ordering of javascript execution in the following page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<script type="text/javascript">
var blah = 0;
function scriptDo...
Hi everyone,
I am very new to Javascript and Jquery, so my apologies for this beginner's question.
In a simple ajax web app, I am creating an HTML page which is mainly a big table. Each row in this table describes an event (party, show, etc). My page not only displays this information but is meant to let the user do a bunch of things w...
For example I need to execute some function when onblur/onfocus event is processed (one element has lost focus and other has taken focus).
To be more specific I have something like the following.
<div id="foo" tabIndex="1" onblur="document.getElementById('bar').style.display = 'none';">foo</div>
<div id="bar" tabIndex="2" onclick="aler...
Hi,
I have a javascript object called 'element' of type HTMLInputElement that corresponds to a HTML input text box element on my page. (Thus, something like $F('element') using prototype will return the text of this box). Is there a way, using prototype and this 'element', for me to access the value of the next HTML input text box in ...
I can't figure out how to access the data between the inner nested tags. When I run this javascript, all I see is "Null".
Here is what my xml file named "bboard.xml" looks like:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Designed by Someone -->
<bulletinboard>
<article>
<title lang="en"><h2>eeeeeeeeegg #1</h2></title>
<detail><s...
So this is 2 questions?
What I'm gonna do is this:
User can modify the elements on the
page,and after modifying he can save
the changes,and next time when he
opens the page,it's like when he saved
it.
It's a little similar to http://www.google.com/ig,which saves your change when placing the widgets.
And I've found it'll se...
Hello,
I have a page the makes an AJAX request, and returns some data from the database, once it is retruned I am trying to append it to a div and make an accordion, however all I am getting is the data back and no accordion here is my source code once the AJAX has run.(snippet)
<script type="text/javascript">
$(document).ready(f...
Is it possible to find in DOM Inspector what tag/class/id combination triggered a particular Computed style rule.
In my particular case I have a font that changes its appearance if a wrap the fragment in some other tag combination. So I see the different computed Style font-size(s), but can not quickly understand the difference in the c...
I need to leverage this DOM event. IE has onpropertychange, which does what I need it to do also. Webkit doesn't seem to support this event, however. Is there an alternative I could use?
...
I want to use the PHP Simple HTML DOM Parser to display all my Left4Dead Steam achievements on my website. The achievements list on the steam community website looks something like this:
<img src="…" /><br />
<div class="achieveImgHolder"><img src="…" /></div>
<div class="achieveTxtHolder">
<img src="…" />
<div class="achieveTxt">
<...
I have project in which I need to create an <iframe> element using JavaScript and append it to the DOM. After that, I need to insert some content into the <iframe>. It's a widget that will be embedded in third-party websites.
I don't set the "src" attribute of the <iframe> since I don't want to load a page; rather, it is used to isolate...
I am attempting to get the innerHTML of the next element, next to which a Click has occured.
So far, I have this as my code
$('translate_this').observe('click', function(e) {
// Immediately stop the click through
Event.stop(e);
x = this.next().innerHTML;
alert(x);
});
However, nothing actually happens,...
I'm using Selenium to test my application. A nice test would be that after every DOM manipulation I would validate the DOM. Is there a nice way to do this?
Obvious ways are:
use some builtin Selenium function. Is there one?
get the HTML of the DOM after the manipulation and use a local validator. However, I can't see how to get the HT...