I want to change the style of my input and browse button for uploading files on my website, and have been reading how this is virtually impossible to do. There are apparently a couple of hacks that may work (not tested) but before I waste time on them I have questions on why professional sites seem to have no problems with it.
When I sa...
Objective-J is compiled/transformed into JavaScript directly on the browser. (This is contrast to doing this on the server, as GWT does for Java.) Has this approach been implemented for any language, other than Objective-J?
...
Hi,
I just created a HTTP server using this code fro the documentation:
var sys = require("sys"),
http = require("http");
http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.end("Hello World!");
sys.puts('Connection');
}).listen(8080);
sys.puts("Server runn...
..I suppose because the html has script tags :-/
<script type="text/javascript">
$(document).ready(function() {
$('.ad_slot').html('<scr'+'ipt type="text/javascript"><!-- amazon_ad_tag = "xxxxxxxx-xx"; amazon_ad_width = "160"; amazon_ad_height = "600"; //--></scr'+'ipt>');
});
</script>
<div class="ad_slot"></div>
witho...
I have an object that contains circular references, and I would like to look at the JSON representation of it. For example, if I build this object:
var myObject = {member:{}};
myObject.member.child = {};
myObject.member.child.parent = myObject.member;
and try to call
JSON.stringify(myObject);
I get the error "too much recursion", n...
I am inserting elements into dom dynamically and for that i m using following steps :(jquery) The initial dom structure is as below:
<div parent div>
</div>
<div child div template>
</div>
clone the parent div using jquery .clone()
clone the child div and do manipulation
append to the cloned parent
do this for all child data
(paren...
Hi,
in this very simple example:
var sys = require("sys"),
http = require("http");
http.createServer(function(request, response) {
response.writeHead(200, {"Content-Type": "text/plain"});
response.end("Hello World!");
}).listen(8080);
sys.puts("Server running at http://localhost:8080/");
1.) What kind of information can ...
I have this string...
var myDate = "November 15, 2010";
.....and I need to do this...
$("#request_showdate_1i").val('2010');
$("#request_showdate_2i").val('November');
$("#request_showdate_3i").val('15');
Any ideas how to break this string up?
...
In PHP, you can do...
range(1, 100); // Array(1, 2, 3...)
Can I do this with JavaScript natively, or do I need a for loop?
All Google searches for JavaScript range bring back results for selecting text in HTML.
...
Firefox extensions can invoke privileged APIs (e.g. nsIProcess to start an external app) without bugging the user, for example this extension does it from the download window: https://addons.mozilla.org/en-US/firefox/addon/10902/
I need to do the same kind of thing, but from a UI on a web page. Can an extension provide a XUL widget (whi...
Hi,
I want to develop an application that allows me to track website visitors. I'm exploring node.js now as an alternative for this. This system will have 3 parts:
1.) Server side script, probably a node.js server.
2.) Air application would be the client. It will connect to the node.js server and display the users online.
3.) Javascrip...
I've seen this effect somewhere, but I can't remember what it was called. I think it was a jQuery plugin, can't be sure.
Basically when scrolling down a page each time you reach a new article it becomes active and you can apply all kinds of nifty effects, and when it scrolls out it becomes inactive.
Hopefully this can explain what I'm...
I have a little hunk of my code here:
if(".level-0.find('.children').length == 1"){
$(".level-0 > a").attr("href", "");
};
Basically I'm saying "If Level 0 has a class of '.children', don't rewrite the HREF in it's link!"
The problem is that it ALWAYS overwrites the HREF, as if there were no conditional. I've changed that "== ...
I'm trying to disable the hover functionality for a menu.
I want it to be enabled only under certain conditions.
I've tried using $(".ulColor").removeClass('hover');, but that hasn't worked
The CSS code for enabling the hover is :
li:hover ul, li.over ul { display: block; }
Here is the HTML DIV inside which the menu resides -
<div...
I wrote this jsfiddle based largely on the example found here. The example is over 2 years old so I was wondering if there is an easier way to check the value of a radio button than gobs of if, elseif, else statements. My values are going to be disabled, both, footer, header so with only four not too bad. I'm just trying to learn how to...
I've got a Rails app that doesn't seem to be triggering the expectedly named .js.erb file, so I'd like to override the default behavior, but I'm not sure how.
The details:
It's a Rails 3 app that renders a button_to with an AJAX call to toggle the status of something on the backend and then modifies the text of the button to reflect th...
Let's say I want to create an Object called 'Vertex'. Usually, in Java I would do this by:
public class Vertex {
// member variables
public data;
private id;
// member methods
public Vertex() { /* default constructor */ }
public getID() { return id; }
}
Now, how would I do that in JavaScript? I want to preserve pri...
Within a "cloaked" site, using obj.innerHTML = something to change the contents of a div seems to screw up the div's position in Firefox and Opera.
Best way to understand the problem is by seeing the code in action. Go to http://www.guggs.net/index_redirected.htm in IE, Firefox or Opera and everything looks as it should.
Hit one of th...
Hello ! Here is my code :
echo "<br><font face='Segoe UI' color='blue'><a href='#' onClick='javascript:alert(".$nam.");return false;'>".$nam."</a></font>";
I'd like to know if there's any syntax error in the above code. I don't think alert() is being called.
Thanks!
...
Assigning value to <li> tag using its id displays me error in IE 6 and IE7,,
Previously I was doing this:
document.getElementById("grandtotaldisplay").innerHTML = "TOTAL PRICE : $"+variable;
this throws me error in IE6 and IE7 as:
Then I tried with jQuery library as suggested my others.. then also I was prompted with same error as ...