javascript

How to properly compress Jquery and lots of plugins?

Hi all, I am trying to clean up the javascript of a site. I am finding the header of my site is looking like this and growing: <script type="text/javascript" src="jquery.base.js"></script> <script type="text/javascript" src="jquery.plugin1.js"></script> <script type="text/javascript" src="jquery.plugin2.js"></script> <script type="tex...

How might I create a menu with images like that used on photobucket?

Please take a moment to look at photobucket.com's navigation menu. Do you know how I can achieve this look with the images next to the dropdown items in the menu. Do you know of any tutorials for this? ...

How to achieve the Yelp Map Marker/Tooltip Effect in Google Maps?

Ok so here's the deal, I'm trying to display a tooltip (instead of the ginfowindow) over some Yelp Map Markers that I am pulling onto a Google Map. I would like to have the exact same effects as Yelp. i.e. The tooltip seems to be set such that it's z-index is always above all other elements nearby, it moves the tooltip once it appears...

Javascript question: Problem with calling an objects methods

Say I have an object called FieldEdit. I define the function constructor for this object, instantiate it via. var obj = new FieldEdit(), and define its methods by FieldEdit.prototype.<method name> = function() { ... }. Under what situations would calling this object's methods within the objects' other methods (via. this.<method name>()...

put delay in javascript

I need to add delay about 100 milisecond to my javascipt but i don't want to use settimeout function of window and either don't want to use busy loop. does anyone has any suggestion? ...

Regex using javascript to return just numbers.

Hi, If I have a string "something12" or "something102". How would I use regex in javascript to return just the numbers parts?? Malcolm ...

Problem with Event Listeners

In my attempt to learn core JavaScript, I am now learning about EventListeners. My problem is that in code below EventListener not being fired in IE (working just fine in Firefox and Chrome). Can somebody please tell me what I am doing wrong? My code is: <p>The first captain of the USS Enterprise NCC-1701 was <a id="wikipedia" ...

How to incoparate or implement a DOM API to v8?

I am writing a server application that is able to manipulate the DOM before it is served to the client. I am using C++ and Google's v8 as a javascript engine but I don't see any DOM API in v8. Is there an open source implementation for doing DOM manipulation on HTML? If not how would you implement one? ...

Is it possible to add dynamically named properties to JavaScript object?

In JavaScript, I've created an object like so: var data = { 'PropertyA': 1, 'PropertyB': 2, 'PropertyC': 3 }; Is it possible to add further properties to this object after it's initial creation if the properties name is not determined until run time? i.e. var propName = 'Property' + someUserInput //imagine someUserInput w...

What are some specific circumstances in which you used JSON over XML?

I still haven't really used JSON in a real world project - I pretty much always rely on XML. ...

Get number days in a specified month using javascript?

Hi, Title says it all. Say I have the month as a number and a year. Malcolm ...

Double-Click HTML files and JQuery

I noticed that when I open HTML file locally by double clicking on it, it will not "run" the same as if I had it on a web server and opened it by HTTP GET request. I need to have a local HTML file a user can open by double clicking on it. This HTML file has several JQuery load calls such as this: $("#content").load("http://somepage.com...

Maintain scroller position on Div after page postback (ASP.NET)

I have a div as such: <div style="overflow-y: scroll; height: 260px"> I contains a few hundred records and allows me to select an item to populate a formview control below it. The problem is that when the page posts-back, the scroller position goes back to the top of the div. I want to try and maintain its position so that the selec...

Creating a site top bar in header dynamically

Is there a way to insert a bar at the top of any webpage (similar to the ones here at Stack Overflow) without needing any special code in the page itself? I'm looking for either a snippet of CSS styling or, if necessary, a Javascript example. It doesn't need any special animations or even a close link, but it does need to make room for i...

Accessing ASP control methods/properties/attributes in Javascript ??

Using Javascript in IE6 with ASPNET.2.0. I need to change the ENABLE or VISIBLE property of an ASP:TextBox called 'tbDate' in the Javascript. Can this be done - if so how ?? Tried the following but doesn't work. document.getElementById('<%=tbDate.ClientID%>').setAttribute("Visible", "False") Any help or links would be much apprecia...

javascript connect to web site code not working

Hello everyone, Here is my javascript code which ping Google for every 10 seconds and display the connection status to html MonitorInformation element. But when I click the html file to debug, the information displayed at MonitorInformation element is always "Connecting...wait". I have debugged for some time but can not figure out. Any ...

onclick go to url THEN do something specific

i have a page on my site (let's call it list_page.html) with js functions that allow you to click a link and see a list of multimedia objects. clicking another link (on the same page) will hide the div with the multimedia list and reveal a list of video objects. another link will hide whatever list is visible and reveal a list of audio o...

GreaseMonkey editing Page

How can I change a page with this html code : <tr> <td nowrap title="7884">Ontem foi dia de</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td align="right">6,0</td></tr> <tr> to this one using greasemonkey : <tr> <td title="7884" nowrap="nowrap"...

Is there a better way to do jquery Tabs?

Below is the jquery code I am using for my AJAX tabs Is there a better way that would be faster in the browser, I don't care about fancy transitions. <script type="text/javascript"> var pageUrl = new Array(); pageUrl[1] = "HOMEbulletin.inc.php"; pageUrl[2] = "HOMEfriendstatus.inc.php"; pageUrl[3] = "HOMEbulletin.inc.php"; function...

CSS / Jquery Effect - What is this ?

Hi, on this website: http://www.eco-environments.co.uk/ if you scroll down to "What we do" and rollover the links you get a bubble popup display, can anyone tell me how this is created please? Thanks ...