Imagine I have the following elements:
+------------------+
| |
| +----------------+
| | |
| | |
| +----------------+
| |
+------------------+
The inner element has positioning that mean it can visually sit outside of its parent, and I put an event listener on...
With which will function(){} fire first?
A) window.addEvent('domready', function(){});
B) window.addEvent('load', function(){});
...
Hi all
I am reading in a complex chunk of HTML and I'd love to be able to walk this sub-tree of HTML in the same way I can the DOM.
Is there a way in Prototype to take a raw chunk of HTML (say from an AJAX call) and 'wrap it' in some way so that it becomes a Prototype element and thus allow me to search it using .up() .down() etc?
...
I've been asked to create a web UI that allows a user to modify a specific section of the HTML DOM and then POST the modifications back to the server for storage. The modification should be done via drag'n'drop, with my tool of choice being jQuery. The server will be PHP, but written by someone else since I'm not a PHP programmer.
The ...
I have a link:
<a id="theLink" href="h***://stackoverflow.com">Go to SO</a>
How can I use prototype to either strip <a>'s or just leave the innerHTML so that the elements becomes:
[h***://stackoverflow.com] (something that is no longer clickable)?
Or maybe convert the <a> to a <span>
...
I viewed the html source code, there is no <tbody>, but when viewed via firebug in the HTML tab, <tbody> appears. Any idea why?
...
As we know , When we load frame from webpage of safari, we will invoke the delegate methods of webkit informal protocol(WebFrameLoadDelegate):
webView:didStartProvisionalLoadForFrame:
webView:didChangeLocationWithinPageForFrame:
But I want to know whick class and methods will be invoked when reload a webpage or open a new webpage ...
As we know , When we load frame from webpage of safari, we will invoke the delegate methods of webkit informal protocol(WebFrameLoadDelegate):
webView:didStartProvisionalLoadForFrame:
webView:didChangeLocationWithinPageForFrame:
and I know when reload the page I can do this:
- (void)webView:(WebView *)senderdidStartProvisionalLoadFor...
Hello,
We have a web application where we're using "top.document" since this application uses iframes and sometimes we must reach the top document.
The problem started now since we need to integrate this application in a website and we put it inside an iFrame in this very site. Since the application uses "top.document" it is reaching t...
Can someone explain to me what is nodeValue in this and write out how nodeValue look like or write out what's in nodeValue? EDIT: Sorry! Yes, this is PHP.
And..
foreach ($elements as $e) {
echo $e->nodeValue;
}
What does the arrow thingy mean (->)? That's an array right? Well if you can explain to me this one part that would be gre...
Hey guys, is there any way to tell the Transformer (when serializing an xml document using DOM), to omit the standalone attribute?
Preferably without using a hack , i.e. ommitting the whole xml declaration and then prepending it manually.
Thanks
-Vic
My current code:
Transformer transformer = TransformerFactory.newInstance().newTran...
how do I refactor this to use oop , with mvc pattern.
(function () {
var dataToImage = { 'a': 'a.gif', 'b': 'something.gif' };
var currentimage = dataToImage['a'];
function setCurrentImage(e){ currentImage = e.src; }
function getMousePosition(){ }
function drawToolbar {
for(i in dataToImage){
document.write('<img sr...
Now I am making a safari plug-in for get flash url. and then show it in my webview . But if I downloaded these flash before showing them, it took long time and maybe some time delay. how to find the method to get the flash local cache showing in safari? Thank you very much!
...
I'm writing an extension for firefox. Using dom.location to keep track of visited search results pages, i'm getting this url http://www.google.com/search?hl=en&source=hp&q=hi&aq=f&aqi=&oq=&fp=642c18fb4411ca2e . If you click it, the google search results for "hi" should come up. You'll know that from the title bar ...
User is on a webpage , uses his mouse to select stuff, how can i use javascript to know what has been selected?
...
Part of my code I get the OuterHTML propery
"<LI onclick="TabClicked(this, 'SearchName', 'TabGroup1');">Name "
so I can do stuff involing parsing it.
There is no OuterHTML property in javascript on firefox though and I can't find an alternative way to get this string. Ideas?
...
Hi there. I'm on my way to creating a greasemonkey script for gmail.
The first thing I want to play with is reducing the size of 'main' pane. This is where either the list of emails are or where the email message is being displayed.
Using Firebug, I can find two separate instances of a "<div class="nH nn" style="width: 1013px;">" tag....
I've got two JS functions, one that is adding options to a select box
function addOption(selectId, text, value) {
var selectbox = document.getElementById(selectId);
var optNew = document.createElement('option');
optNew.text = text;
optNew.value = value;
try {
selectbox.add(optNew, null); //page position reset...
I would like the text in the value field of a text box to disappear when that text box gains focus, and then reappear in response to the eventual blur event - but only if the value is empty (that is, if the user hasn't entered anything after putting focus into the text box). So far, I have this:
this.each(function() {
obj = $(this...
I have a site setup using transparent PNG images that, of course, don't want in IE without the transparency fix applied. Well, the fix is applied but it still isn't working.
div, img { behavior: url('/path/to/fix/iepngfix.htc'); }
I know it's loading the HTC file correctly as an alert(1) fires upon page load. The images, however, aren'...