javascript

ASP.NET - server side control & javascript interaction

Hi folks, on a page with textbox control, lets say this textbox is disabled on server side page load. What would happen if a javascript tries to set visibility of the textbox to false ? Edit: Can the textbox be hidden by javascript even though it's disabled ? TIA ...

How to make on click an label combo box should appear...

On click an label an combo box should appear... please check http://guruji.com/en/local.html on clicking near mycity the label changes into combobox (dropdown list)..how to do it. ...

jQuery pagination on mutiple locations on the same page not working

So I have the pagination working for one instance on the page, however; it breaks down if you have another instance on the same page. Example: One tab is all white papers and paginated, the next tab is filtered white papers by an industry with pagination. Below that filter box is another box for say datasheets with the same tabbed inte...

Is there any way to prevent replacement of JavaScript object properties?

I would like to make an object's structure immutable, preventing its properties from being subsequently replaced. The properties need to be readable, however. Is this possible? I'm sure there are no language features (along the lines of final in Java and sealed in C#) to support this but wondered whether there might be another mechanism...

How to Scroll an iFrame using javascript

I have several iFrames that load an external webpage, although only 1 appears at a time, hence all have the id="iFrame" I want to add to buttons (not the scrollbar) so the user can scroll down or up by pressing them, and I am trying to do this using javascript but so far I've been unsuccessful, I've read some posts here and tried those a...

Detect when iframe is cross-domain, then bust out of it

I have a page with a large iframe that contains a majority of the content. The user interacts with the website by clicking around within the iframe. The functionality I'm trying to build is: When a user navigates away from my site, I do them a favor and bust out of the iframe. The iframe has an onload event which is fired every time a n...

Execcommand for iframe don't work

Hello everybody, I am making my own WYSIWYG editor. But i can't make any text bold with the execcommand function. I am using the next code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> ...

Display a warning when leaving the site, not just the page

This sounded like something almost impossible to do when it was presented to me. I know you can display a dialog box to confirm when leaving a web page. But is it possible to display a dialog box when leaving a site? I haven't been able to find/create anything that can read the address bar and know that you're leaving the site. ...

Why does this website freeze in IE 7 but not in any other browser?

I built a Parts Catalog for a company recently. It works perfectly in Firefox, Chrome, Safari, etc. However, in IE 7, every single page works except for the actual parts page itself: http://www.swstruckbodiesandtrailers.com/index.php?pageId=69 It actually locks the entire browser up, and after reviewing the source, I have no idea why. ...

Get definition of unknown object in Javascript

Is there any way to get the definition (public methods and properties) of an object in Javascript that is unknown? In reality, I know what the object should be, but it's having problems accessing Methods that should be there, so I want to see what Methods are defined. I have no control over this object so I can't use JSON or toString. ...

jQuery global variable problem

var id = $(this).children().html(); // id is 5 $.ajax({ url: 'ajax.php?id=' + id, success: function(data) { id = data; // id is 1 } }); if(id == 1){ // id is again 5 ... } Why in the following example I can't reinitialize the id variable? What is wrong? Thanks. ...

Is there any way to get an ExtJS GridPanel to automatically resize its width, but still be contained inside some non-ExtJS-generated HTML?

I want to include an ExtJS GridPanel inside a larger layout, which in turn must be rendered inside a particular div in some pre-existing HTML that I don't control. From my experiments, it appears that the GridPanel only resizes itself correctly if it's within a Viewport. For instance, with this code the GridPanel automatically resizes: ...

acessing PHP variables in javascript

OK, so I'm not a programmer so please don't beat me up too much... I have a situation where I have some javascript (for jqgrid) that I would like some of the values to be populated from a PHP variable. What I did to get around this is to use PHP and put all the javascript code within a 'here document'. All looks to work well but I tho...

Prototype equivalent for jQuery closest function

Hi Is there any equivalent in Prototype for the jQuery closest function? http://api.jquery.com/closest/ thanks ...

Attaching hashtag to URL with javascript

I want to build an ajax site without sacrificing SEO. My question is: If I have link on my page like this: <a href="http://mysite.com/cats" id="cats">Cats</a> <a href="http://mysite.com/dogs" id="dogs">Dogs</a> ...when each link is clicked I would like to update the address bar with the corresponding hashtag. So, if "Cats" link ...

Widget -what to do and what not

I would like to make a html/js widget that people can add to their blogs, sites etc. I have never made widgets before so I would like to hear what should be done and what not. For example, how do I make the styling? Inline, own css file or what is the best practise? I believe i cant use head and body stuff in it. What about h1, h2 etc? ...

OpenLayers / MapLayers - how to attach a Handler to a Control?

I'm using OpenLayers in a Rails app - through the MapLayers plugin. The examples for adding controls look easy - very similar to the example code on the OpenLayers.Control class - @map = MapLayers::Map.new("map") do |map, page| page << map.add_layer(MapLayers::GOOGLE) page << map.add_layer(MapLayers::YAHOO_HYBRID) page << map.ad...

DHTML Drop Down Menu

Hi I need to generate Dhtml menus. but i want to use a tool. does anyone know what FREE tool should I use? I used CoffeeCup Dhtml menu builder but i does not compatible with IE. ...

Is it possible to create support for tab button in html textarea with JavaScript?

I hate when I try to edit html in textarea, because it doesn't recognize tab button, so I cannot indent my code. So is it possible to generate tab support to textareas with html? And is it possible to create support for tab button with JavaScript? ...

Populating and updating an oddly shaped grid (or table) with JQuery and AJAX

Hi all- I have a weird grid with different height columns. By this I mean, column 1 may have 4 squares that need to be filled while column 2 may have 5 and column 3 may have 2. For the purposes of this question assume they are static and the values are as follows: Col | Height --------------- 1 4 2 3 3 5 4 ...