I have a table that looks something like this.
<table>
<thead>
<tr>
<th>Foo</th>
<th>Bar</th>
</tr>
</thead>
<tbody>
<tr class="data">
<td>Info here</th>
<td><a href"/url_here" class="edit">Edit</a></td>
</tr>
<tr class="data">
<td>More here</th>
<td><a href"/url_here" class=...
Hi,
I am trying to debug a MVC app that uses JQuery.
Firstly I have version 1.3.3 of Firebug and I have set
the Break on All Errors option and have added a deliberate
error but it is not breaking on the error.
Secondly after I have activated something that has a javascript
function and put breakpoint in and then let it continue, it th...
I'm having a weird problem with some Javascript/DOM code I've ben playing with. I'm trying to assign the .onKeyUp and .onChange events/methods to a text input like so:
form.elements["article"].onkeyup = "alert('test');";
Oddly, assigning using that method is doing nothing, and I'm forced to do this manually using:
form.elements["arti...
Hi,
I would like to call a javascript function from an aspx control. For instance, suppose I had:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript">
function test(x, y)
{
}
</script>
</head>
<body>
<form id="form1" runat="server">
<...
I want a string of text to change color from default to #c30 when I click a button somewhere on the page, and it changes back to default when I click the button again.
My code looks like this:
$("#button").click(function() {
var anno = $(#text);
if (anno.css('color') == '#c30') {
anno.css('color', '');
} else {
anno.css('color',...
I'm trying to set a huge (200K) response to innerhtml of a node.
The goal is to get better time than 2.7 sec in internet explorer 6.
Any ideas?,
Thanks
...
How to create a bookmark button that sends the whole page as email .
...
Why do they use
/
instead of
'
in JavaScript string replace()? E.g.:
document.write(str.replace(/hi/, "hey"));
...
I have a page with formated text and a toolbar (images with click events) beside it.
One of the tool-commands is meant to be "mark yellow". (The text has to be read only and is formated.)
I tried to use document.getSelection() and window.getSelection(), but they seem to be designed for input fields only.
The other problem is, that as I...
Is it possible to get the actual URL (as opposed to the src attribute value) of an image within the current DOM using jQuery or JavaScript?
i.e. retrieve "example.com/foo.jpg" as opposed to "foo.jpg" (taking <base> elements into account)
What about any other interesting properties such as the mime type, file size or, best of all, the ...
What do you suggest for JS development IDE. Is there something similar to VisualStudio IDE, so I can run/debug my application in it?
...
I'm using Jquery to submit the value of a <textarea> through AJAX to a PHP script. This value may contain punctuation characters (!,?,#,@) as well as single and double quotes, and other non-alphanumeric characters. Does Jquery take care of encoding all this stuff or do I need to do it myself? How can I be certain that whatever the user t...
I have a php page and i have some javascript code to have a running total of some fields. i pretty well copied from a working test that i had and modified the code some to fit. well it doesn't work and i can't seem to work. is there something blatently obvious i'm missing or is there some other reason why it's not running?
<?php
/...
When I load data in my code-behind, I find that often I want to run several javascript functions based on my data. It it more efficient to use a StringBuilder to compile all of my function calls and issue RegisterStartupScript one time, or is performance the same if I issue RegisterStartupScript everytime I need it?
...
SQL Server reports can embed vbscript and execute client side, but can the same be done with javascript? I think there would be great utility to be able to execute jQuery and CSS manipulation client side to create a more interactive drill down experience.
...
Ok, I have a very frustrating problem. I am parsing a webpage and need to have it execute the javascript in order to get the information I want.
Form f = new Form();
WebBrowser w = new WebBrowser();
w.Navigate(url);
f.Controls.Add(w);
f.ShowDialog();
HtmlElementCollection hc = w.Document.GetElementsByTagName("button");
This works and...
EDIT: OK, I believe the following solutions are valid:
Use the jQuery AOP plugin. It basically wraps the old function together with the hook into a function sandwich and reassigns it to the old function name. This causes nesting of functions with each new added hook.
If jQuery is not usable for you, just pillage the source code, there ...
Let's say I instantiate an object in Javascript like this:
var myObj = new someObject();
Now, is it possible to obtain the var object's name as string 'myObj' from within one of the class methods?
Additional details (edited):
The reason why I would like to get the name of the variable holding reference to the object is that my new...
I have dynamic web page with JS. There is a textarea and a Send button, but no form tags. How do I make Submit button fire and the textarea get cleared when Enter is pressed in the textarea?
...
I've been using Google Reader and want to implement a similar technique to the way they "seem" to late load the content of each post. When you click on one of your subscriptions, you see a series of posts with a snippet and other information. When you click on a post, it expands to reveal the full body. I thought they were simply togglin...