Prototype's activate function
Gives focus to a form control and selects its contents if it is a text input
according to the Prototype website. i.e.
$('my_element_id').activate();
What is the equivalent function in jQuery?
...
How do i go about changing the css of an iframe scrollbar? My problem with the current scrollbar in my iframe is the frame is not very wide and the scrollbar appears bulky in it and takes up too much space... Using "scrolling="no" makes the scrollbar disappear but then the user cannot scroll... By the way, My browser is Google Chrome...
...
Hi all,
so the onbeforeunload event doesn't have mouse information, so how do I get mouse XY? I am trying to know if the user clicked the close buttom on the browser to log them out right away (20minutes of session is too long for resource, but, we will not shorten it to make customer angry).
On IE, I can simply access mouse info to fi...
How do I write a notification bar in JavaScript similar to the one that you see on Stack Overflow?
In my project they are asking for one just the same as this website and I'm looking to see how I go about coding one up.
How can I write the code for this?
Any suggestions?
...
can you please give me a structure like this:
<html><body><svg></svg><javascript>..............</html> ??
i am having A LOT of trouble adding css and javascript to an SVG file that looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativeco...
Apologies for the quick question, but I'd like to see some sample widgets that allow multiple instances in the same page. (Articles about this technique would also be good!)
Digg's widget allows this (http://about.digg.com/downloads/widgets) but I don't know of any others.
Do you?
Thanks.
...
Hi
I have this HTML which looks like this:
<input type="submit" name="savebutton" class="first button" />
<input type="submit" name="savebutton" class="second button" />
and JS:
jQuery("input.second").click(function(){
// trigger second button ?
return false;
});
So how can I trigger the click event from the 2nd button by cl...
I'm trying to use document.write() to load the Google Libraries JavaScript API. The following works (the alert pops up) in every browser other than IE. Please note that I replaced my actual API key with "MY_API_KEY" in the example below and that the script tag is broken into two strings to keep the browser from having parsing errors.
...
i have a map of the US:
http://upload.wikimedia.org/wikipedia/commons/a/a5/Map_of_USA_with_state_names.svg
i am trying to embed this code in it:
http://sixrevisions.com/tutorials/javascript_tutorial/create_lightweight_javascript_tooltip/
as you can see it has CSS and javascript
however, i am having a very diffficult time trying to p...
I want to set both #map_canvas and #content's height, but this doesn't seem to work:
$(['#map_canvas','#content']).css("height", ($(window).height()-270 + "px"));
Does anybody know how to do this?
...
Hi All,
I have a table structure:
<tr>
<td>
<a href="#" class="xx"></a>
</td>
<td>
data
</td>
</tr>
<tr>
<td>
<img src="#" class="cc" />
</td>
</tr>
<tr>
<td>
<a href="#" class="xx"></a>
</td>
<td>
data2
</td>
</tr>
<tr>
<td>
<img src="#" class="cc" />
</td>
</tr>
Now, on load, 2nd an...
i am getting this error on the last line here:
<path
d="M 909.99146,226.40625 L 911.86646,228.4375 L 914.05396,232.03125 L 914.05396,233.90625 L 912.02271,238.4375 L 910.14771,239.0625 L 906.86646,242.03125 L 902.17896,247.34375 C 902.17896,247.34375 901.55396,247.34375 900.92896,247.34375 C 900.30396,247.34375 899.99146,245....
My goal here is to override a method if it isn't found, otherwise use the original method (for backwards compatibility of a library I can't alter).
This is what I have so far, but am still struggling with:
this.grid.getDataSource = function(){
if (typeof this.grid.getDataSource.getDataSource == "undefined")
return t...
Kind of a dilemma here. I am making a mobile version of a website, that has some interactive things more specifically I have this object in 3D that you can spin, I was using papervision in Flash but now I need to do this differently since there is no flash in mobile and I feel I am on thin ice.
I was thinking of exporting a 360 degree s...
I'm using the Dojo Javascript library and trying to add a Select component to my page for a list of states. It works great in Firefox, however, in IE when single clicking in the white area under the scrollbar slider doesn't work. The list moves back to the top. Here is a simple example: http://www.northpointgis.com/files/testdijiform2...
I'm still trying to understand javascript scoping. What is the simplest way to return a value from an anonymous callback function? For instance,
var test = 'outside';
callsFunction(function() { test = 'inside'; });
console.log(test);
where callsFunction calls the anonymous function. I would like this to print 'inside'.
...
i follow this article
i find can use kmllayer to insert kml or georss , like this :
var myLatlng = new google.maps.LatLng(49.496675,-102.65625);
var myOptions = {
zoom: 4,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var georssLaye...
I have an html element that I want to hide from view, but I can't access that element by an ID because it has no ID and I can't assign an ID to it. It has a class assigned to it though. Is there any possible way to hide this element from view without having it's id?
...
I have an Ajax request:
$.ajax({ url: "MyPage.aspx",
data: params,
success: function(data) {
// Check results
$('#testp').append(data.message);
enableForm();
},
error: function() {
alert('Unable to load the permissions for this user level.\n\nYour login may have expired.')...
As a followup to http://stackoverflow.com/questions/3558240 I'm now having troubles with defining setters in a loop.
This is the code that I'm attempting to use within a Greasemonkey script.
var setValue_InStoredObject = function(_prefName, _varName, _newValue)
{
console.info('setValue_InStoredObject:\narguments = ');
console.inf...