Is there a way to programmatically access a page's current zoom-level in javascript with Safari 5? I'd like to access it with a Safari extension, but I'm coming up empty in the documentation. I'd also be interested in any other creative ways to mimic full-page zoom (maybe with CSS?) that could be done with the new extension system in Saf...
Hello Everyone,
I am encountering a very annoying problem with IE. Basically I need to set the source of an IFrame using JavaScript, however the source document is being executed twice not once during each call.
The simplified HTML code is pasted below (I simplified it so that readers can understand it quickly. The source is being set...
In my app, I have an OL tag whose contents are changed by various other dynamic events. Is there some way to put a listener on that OL so that I can execute a function whenever its contents are altered in any way? In this example I need to update a count of items in the list which appears in another spot in the interface.
I am using jQu...
You can locate the place by searching test11" " " " " " " " in the page,
but if you view the source code, you'll see the related html is like this:
test11<table style="display: table;" class="listview rowstyle-rowhighlight"" id="resourcegrid">
Where does the " " " " " " " " come from?
The problem can be seen here
...
I have a DIV which contains some text. When a user clicks on some content in the DIV, I want to enable him to edit the content at that position.
<div id='Note'>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, <br />
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. <br />
Ut enim ad minim veniam, quis nostrud...
I would really love to be able to see the code that is affecting a specific DOM element.
But I also would really love not to have to look through all my javascript searching for references/selectors that might be causing the issue.
Does anyone have a technique for causing a browser debugger to break on any changes to a specific DOM ele...
How can you decorate a DOM node so that you add an event handler, but within the new handler you can call the previous handler?
...
My web application sends me diagnostic info from the browser javascript telling me that a [script] tag I've injected has failed to download the associated .js file. I can't reproduce this locally, and there is no particular pattern to which file fails, or what the browser type is. There is a pattern to the geo location of the requests ...
With $.ajax i'm getting a page dinamicly generated via PHP code, in the HTML returned I need only one object ('lwrapper' in my code).
How can I grabber my object (with id='lwrapper') from 'data' returned.
this is my code
$.ajax({
url: ref, //the url
cache: false,
success: function(data){
//code ...
While having one of my questions answered, cletus mentioned that when creating elements in jQuery it's better to use direct DOM element creation, instead of innerHTML. I tried googling it but I wasn't able to find a good article with comparisons.
I've provided this code bellow as an example and I was wondering if someone could help me ...
Just wondering if it's possible to print and list all methods and attributes available to the DOM document itself using Javascript?
So I would get something like so:
Document.doctype
Document.implementation
Document.documentElement
Document.createElement
Document.createDocumentFragment
Document.createTextNode
Document.createComment
Doc...
I need to know which of these two JavaScript frameworks is better for client-side dynamic content modification for known DOM elements (by id), in terms of performance, memory usage, etc.:
Prototype's $('id').update(content)
jQuery's jQuery('#id').html(content)
EDIT: My real concerns are clarified at the end of the question.
BTW, bot...
I have written a simple jQuery script that changes the hash tag of a link. I do this because I am using IntenseDebate comments in Wordpress but the comment link still links replaced id of the old comments. I'm using jQuery so that if javascript is enabled, the user can click on the comments link and it will take them to the IntenseDebate...
I'm having quite the brainbuster of an issue right now. I am trying to change a link's hash tag at the end from "respond" to "comments" with jQuery. I have a simple script that should do this, however it does not work. The link does not change. However, Firebug shows no errors and when I run the code in Firebug's console, it works just a...
I want to create something like this at run-time:
<CWS>
<Case name="10-040-00022">
<CaseDetailsSet>
<CaseDetail title="Patient name" />
<CaseDetail title="Date of birth" />
</CaseDetailsSet>
</Case>
</CWS>
so I wrote something like this ( I wish to use DOM in .NET .. not the XMLWriter,etc)
...
jQuery has handy .height() and .width() utilities to get calculated displayed size of a DOM element. It also has .position() to get coordinates. In YUI3 Node, I see that there are .getX(), .getY() and .getXY() utilities to get position, but I do not see anything for size (or can't look).
What's a good way to get element height and width...
At the moment I achieve this using something like this:
var myElem = "<tr id='tr-1'><td>content</td></tr>";
$("#myTable").append(myElem);
$("#tr-1").click(function() {
// blah blah
});
Traditionally, when I wasn't using jQuery, I used to do something like this:
var myElem = document.createElement(...);
var myTable = document.getEle...
I have the following code on a webpage:
<div id="emails">
<ul>
<li>email1</li>
<li>email2</li>
</ul>
</div>
<a href="#" onClick="deleteEmail()">click</a>
and I want to remove the first email, i've been trying with this:
function deleteEmail(){
var ul = document.getElementById('emails').getElementsByTagName('ul');
ul.removeC...
Hello, I have a few inputTextBoxes and I'm using document.activeElement to handle value changes of those inputboxes called by "change()" function of inputBox element.
the problem is when I change the value of one of the inputboxes and then click in another inputbox... the function will get the document.activeElement of the new inputbox ...
I'm trying to create a greasemonkey script (for Opera) to add autocomplete to input elements found on a webpage but it's not completely working.
I first got the autocomplete plugin working:
// ==UserScript==
// @name autocomplete
// @description autocomplete
// @include *
// ==/UserScript==
// Add jQuery
var GM_JQ ...