Hi, I am mlearning javascript and have some trouble creating an onject via prototype.
I have this:
<script type="text/javascript">
function myclass(a, b, c) {
if (arguments.length) { this.Init(a, b, c); }
}
myclass.prototype.Init = function(a, b, c) {
this.param1 = a;
thi...
Hi,
I am trying to get the jQuery tools 'expose' function to work properly in IE6. The page is http://204.51.246.10:12123/test-ie6.aspx
You will need IE6 to reproduce the bug (obviously :)). If you click 'Sign In' on the top-right corner (below the 'Join Today!' button), you will notice that the sign in panel (fieldset#login-controls) ...
I know that detecting scrollbar presence is supposed to be one of those elusive things that we should all have to suffer through. What I've read so far is that you can't really detect scrollbar presence, only use hints in the DOM to know if they may be present, and it can't be done in less than 30 lines of code.
This sounds a little im...
My guess is that this javascript just finds the div called divid and then uses it with the sendit function.
var somevalue = 19;
if (navigator.appName.indexOf("Microsoft") != -1) {
thediv = window["divid"];
} else {
thediv = document["divid"];
}
thediv.sendit(somevalue);
I would imagine in jQuery it would look something as s...
I need to create several Divs dynamically, and I need to add "onmouseover" event to them. However, the JAVASCRIPT "div.onmouseover = handler" can't pass in parameters. how can I pass parameters in those dynamic event handlers?
...
I noticed something in Chrome the other day- I had opened Developer Tools, and then hit view source and was initially surprised to notice that apparently the developer tools window is coded in HTML and JavaScript- you can see that by putting the following into the Chrome address bar:
view-source:chrome://devtools/devtools.html
Two thin...
Hi,
I'd like to upload a file from a client machine to my server. The user would have to specify the file to upload as I understand it, using a form that looks like:
<input type="file" name="datafile" size="40">
This pops up a native file picker, which is great. The problem I'm having is that it's a real pain (for most users) to go l...
I have started using ajax/jQuery in our websites / application. There are many plugins that support degrading the javascript to browsers that dont have javascript enabled and techniques to support this. What are peoples thoughts on javascript support, we build applications rather than just websites and are looking to just support javascr...
I can't seem to find the function to remove a shape or path from the canvas after it has been created.
So I'm creating a bezier curve between 2 points with
beginPath();
bezierCurveTo();
stroke();
closePath();
. How can I remove this from the canvas once it's been created? I need to be able to call the remove function via toggle() and...
Hi, I'm making a plugin and one of the options is a standard callback. I want the user to be able to re-run the jQuery plugin's this.each() which basically re-runs the plugin, for example;
callback: function(){
// some code to rerun the plugin here after 10 seconds
}
I know I can do this like so: $(this).plugin_name(); but it won'...
I've been a JavaScript developer for a while now, and I've always thought that the correct way to implement private members in JavaScript is to use the technique outlined by Doug Crockford here: http://javascript.crockford.com/private.html.
I didn't think this was a particularly controversial piece of JavaScript wisdom, until I started ...
Hi Folks!
I have been working on a web app and for part of it I need to open a new window. I have this working on all browsers, my sticking point is with Google Chrome.
Chrome seems to ignore the window features which is causing me issues, the thing I'm struggling with is I need the address bar to be editable within the new window. FF,...
The contents of the following div is derived dynamically: i.e a table is added dynamically to this div with some button.
My question is how to print the content of this div(window.print) and not other things in the page
<div id="newdiv" name="newdiv"></div>
Thanks.
...
In the following table: how to adjust the height and width automatically for the table.
i.e, if the data is more it should display all the data else present data in a fashionable manner
<table id="mytable">
<tr>
<td>more data.............................................................................</td>
<td>a</td>
</tr>...
How to disable asp:TextBox on client-side click on HTML checkbox or server-side asp:CheckBox using JavaScript?
<script type="text/javascript" language="javascript">
function enableTextbox() {
// ?
}
</script>
<table>
<tr>
<td>
<input id="checkTake" onclick="enableTextbox" title="Take?" />
...
Is there any JavaScript or jQuery plugin Math Library with polynomial fit routines?
...
I have a simple web site (http://www.kousenit.com/twitterfollowervalue) that computes a quantity based on a person's Twitter followers. Since the Twitter API only returns followers 100 at a time, a complete process may involve lots of calls.
At the moment, I have an Ajax call to a method that runs the Twitter loop. The method looks lik...
Does anyone know how to get the blur event to fire on the document for the iPhone?
I'm trying to get it to fire either when a user changes windows in Safari, or when they open their bookmarks or when they decide to add the page to their homescreen. But none of these are firing it.
Here's my code:
$(document).blur( function () { ...
I am just doing a simple Ajax.Request call using the newest version of Prototype. It works fine in Firefox, Internet Explorer, and even Safari... but not in Chrome. Here is my code...
alert(url);
new Ajax.Request(url, {
method: 'get',
onSuccess: function(transport) {
alert('test');
}
});
It pops up he URL alert but the tes...
Hi, I'd like to know how to put multiple markers for Google Maps using Javascript API v3.
I tried the solution posted here, but it does not work for me for some reason:
var directionDisplay;
function initialize() {
var myOptions = { zoom: 9, center: new google.maps.LatLng(40.81940575,-73.95647955), mapTypeId: google.maps.Map...