javascript

IE7 popup, hide the url bar

when i do window.open to do pop up on new window. i unable to hide the url bar in ie7. it still show the url bar even though it's read only. can hide it? i do not want user to see the url ...

How do I find the id of a jquery autocomplete input from within the onItemSelect callback?

I'm using the jquery autocomplete plugin from pengoworks: http://www.pengoworks.com/workshop/jquery/autocomplete_docs.txt In the function called upon an entry being selected, I want to find out the name (id) of the input element. (Because the callback is going to be used for multiple autocompletes.) Code looks like this: myCallback =...

capture a Shift and Click event with jquery

Hello, I don't seem to be able to capture two events at the same time. I am trying to capture the Shift and Click (mouse click) event. I have no problem capturing each action separately but not the two together. Has anybody done some research on that particular problem. Cheers nawak ...

Calling Javascript with Flash

If I call a JavaScript function from flash like so: ExternalInterface.call("main"); This is all fine and good, but I want my scope to be a particular prototype, is there any way I can do something like: ExternalInterface.call("someObj.main()"); So that the keyword this points to someObj? I'm not against somehow passing it as an arg...

prevent iframe content reload on hide in firefox

In my webapplication I hide an iframe using jquery hide() function. Surprisingly firefox reload the content of iframe when the iframe is hidden. Is this a known problem? Is there a workaround? I also tried to hide the iframe setting css style display to 'none'. Same result. The script work as expected in opera. I'm using firefox 3.5.1 ...

Degrading gracefully with Web Workers

So I'm starting to hear more and more about Web Workers. I think it's absolutely fantastic, but the question I haven't seen anyone really tackle so far is how to support older browsers that do not yet have support for the new technology. The only solution I've been able to come up with so far is to make some sort of wrapper around the ...

Javascript events not firing in the expected order

So I have yet another little JavaScript issue with my current project: JS events aren't firing in the order that I expect them to. Let's say I've got a text field with an onBlur event that fires an AJAX call that does some calculating on the server (I'm using .NET 3.5's WebServices with JSON). Its callback method populates a page full ...

Getting the values in a dropdownbox from javascript

Does anyone know how to get the values from an asp dropdownbox (not just the selected one) using javascript? ...

[ext js] Renderer for ColumnTree?

Hello! I'm trying to add a custom renderer to a ColumnTree in Ext JS. Since it appears(?) that this isn't supported, does anyone know of any workaround to use a renderer? Here's a snippet of code - let's just say (hypothetically) that I have a renderer I'd like to use for the documentsVersion tab below - does anyone have any ideas? ret...

Form Validation using JavaScript

I'm trying to validate a form using JavaScript but i'm a bit stuck on displaying a message next to the field to say that "This field is required". How do I go about doing this? Sorry, I'm very new to JavaScript. Here's my js code: var allFieldsRequired = true; function specialPostcode(postalCode) { var re = /^[TA]{2}([1-14]|22|15){1,2}...

How to create a hovering pop up

I would like to have a link on my site that when you click it a site segment that hovers above the content appears and displays some information until it is closed in some way, and I would like to be able to insert anything I want to in there- text, images, CSS formatting, etc. What language should I use for this? Do you know any sites...

Image Thumbnails

It is possible to produce thumbnails from an image within a viewport slicing them? Possibly with Jquery! Like in this example but without using the canvs element. Galleria does something like that, but it's pretty slow on loading all the pictures in the cache and then resized them. I'm using a preloader but I don;t know how to resize the...

ExternalInterface not working in IE

I am trying to call an action in a flash object from the javascript: as: function testExternalConnection(str:String):Void { _root.debug.htmlText = "testExternalConnection ok"; } ExternalInterface.addCallback("testExternalConnection", this, testExternalConnection); js: var movie = getFlashMovie("ap1_mod_hidden") movie.testExterna...

A way to override the constructor on HTMLElement so I can add custom code

I'm trying to somehow override the constructor of HTMLElement (specifically HTMLDivElement), so that whenever any are created by whatever means, I can run some custom logic. Obviously this doesn't work: HTMLDivElement.prototype.constructor = function() { alert('div created!'); } Is there a way to pull this off? Even if there was a...

Finding column index using jQuery when table contains column-spanning cells

Using jQuery, how can I find the column index of an arbitrary table cell in the example table below, such that cells spanning multiple columns have multiple indexes? HTML <table> <tbody> <tr> <td>One</td> <td>Two</td> <td id="example1">Three</td> <td>Four</td> <td>Five</td> <td>Six</td> </t...

Javascript E4X: Select a node based on an attribute value

Consider this scenario: Using Javascript/E4X, in a non-browser usage scenario (a Javascript HL7 integration engine), there is a variable holding an XML snippet that could have multiple repeating nodes. <pets> <pet type="dog">Barney</pet> <pet type="cat">Socks</pet> </pets> Code: var petsXml; // pretend it holds the above xm...

Conflict between mootools and another (non-framework) script

I'm trying to integrate a javascript called ImageFlow into a Joomla site, but I'm getting an error in Internet Explorer (v8 native and compatibility mode) and it won't display. It works fine in Firefox and other browsers). I believe the error is related to mootools. Error details: Message: Object doesn't support this property or met...

How to get tabular data from sql server from javascript.

Here is my scenario: User enters in address Address is geolocated Geolocation is buffered (1 ft) Graphic returned is used in query feature to get a road ID All the above is pretty straight forward ESRI JavaScript API – now I am hitting a bit of a crossroads in approaches and I am wondering if you have an approach you use for the fo...

What is the best looking web standards treeview for the web?

Does anyone know of a good TreeView for the web that is nice looking, efficient, and uses web standards? We use jQuery so it would be nice if it did too, but that isn't a requirment. ...

How to know if a window is a child or parent window?

How can a browser window know if it is a parent window or a child window using JavaScript? I was hoping to make use of this in a conditional. if(parentWindow){//.. Thank you for any help. ...