javascript

For the Web UI gurus

Hi everyone, I finally reached the point in my web app where implementing simple requirements is becoming overwhelming. I'm guessing it's time for a nice refactoring or a simple garbage and redo. Here are the simple requirements I need to implement on a table: 1) make the columns sortable 2) freeze the 2 header rows and first 3 colu...

Javascript regex returning null but it shouldn't be. Why?

I have a regex that searches the source of a page it retrieves via Ajax and gets all the data inbetween and including the fieldset tags. Here's my javascript: var req = new XMLHttpRequest(); var regex = new RegExp("<(fieldset)\b[^>]*>.*?</\1>"); function showEditForm(i) { req.open('GET', '/admin/maps/edit/' + i, false); req....

How do i make an area unclickable with CSS?

Let's say if I have wrapper div which includes some links and images, is there any way I can deactivate it at once with CSS only? // after review of answers I dropped the idea that can make it with CSS only. jQuery blockUI plug in works like charm. Thanks a lot. ...

Updating RSS <link> URL with Javascript?

Is it possible to update the URL of an rss <link> tag dynamically, so that when the RSS icon in the location bar is clicked, the browser will direct the user to the updated URL? For example, using Jquery: <link id="feed_url" rel="alternate" type="application/rss+xml" title="RSS" href="/feed" /> <script type="text/javascript"> $("#feed_...

Rotate png using PHP or Javascript

I'm trying to rotate a png that's based off a value in my database (1-360 degrees) however, I'm using it in conjunction with the google mapping api and if I use "header('Content-type: image/png');" my map does not show and only the image. Any ideas? ...

What is PHP like as a programming language?

I am not really familiar with PHP, but I get the impression that it is like JavaScript (syntax-wise). What are the benefits of a dynamically typed language, when compared to a strongly typed language like C# or Java, and how would this help in the context of web development? What would make a dynamically typed language so attractive? ...

Problem of import js file in https page in IE8

It seems that in IE8, if the page using https protocol needs to import a .js file, the .js file also needs to use the https protocol. <script type="text/javscript" src="http://xxx/yourjs.js"&gt;&lt;/script&gt; works in all browsers except IE8 <script type="text/javscript" src="https://xxx/yourjs.js"&gt;&lt;/script&gt; works in al...

opening Outlook through javascript

Does anyone know how to open Outlook using Javascript? I am getting an exception (in IE6) while using this code: var outlookApp = new ActiveXObject("Outlook.Application"); ...

Refactoring many JQuery Ajax calls - best practice?

I have a lot of JavaScript/ JQuery code blocks to handle asynchronous data processing in my page. Each code block has three functions (code is incomplete and for illustrative purpose only): encapsulates $.ajax call: function doSomething(data){ // do some preprocessing $.ajax({}); // some JQuery Ajax operation that accepts dat...

How to open another window

Hi , how can i open a page in new window in using javascript. ...

Adding javascript to a link's OnClientClick property while binding a repeater

Hi, I'm trying to get this working but no success: <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="btnDeleteFamily_Click"> <HeaderTemplate> <table> <tr> <th width="90" valign="top"><%=getTag("name")%></th> </tr> </HeaderTemplate> <ItemTemplate> <tr> <td><%#Eval("chrname")%></td> ...

Javascript: undefined !== undefined ?

When I recently integrated Facebook Connect with Tersus, I initially received the error messages Invalid Enumeration Value and Handler already exists when trying to call Facebook API functions. It turned out that the cause of the problem was object.x === undefined returning false when there is no property 'x' in 'object'. I worked a...

How can I access the actual text that is displayed in a DIV when using CSS style overflow: hidden?

I have the following content DIV on my page, which displays dynamic text: <div id="someContent"> </div> It uses the following CSS to cut off additional text: #someContent { height: 200px; width: 200px; overflow: hidden; } If I load this text into the DIV: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praes...

Does window.opener work when on different domains?

Will window.opener work if the child window is on a different domain than the parent window? What about when it's the same domain on IIS7, but on a different application/virtual directory? ...

iPhone Safari: Scroll a list inside a html container

Hi all, I did a lot of research about this topic and didn't yet find a satisfying answer: How can I make a scrollable list (iPhone SDK Dashboard List) inside some other html content? If I create a list inside a html body and I try to scroll the whole page is scrolled. I know there is this "double finger" scrolling, but that's not what ...

How can I ensure my GIFs keep animating even after document.location="" has been run

Take the following HTML: <img src="/any-animated-gif.gf" alt="" /> <br /><br /> <a href="#" onclick="document.location='/anything-that-takes-a-few-seconds-to-load.html';return false;">Click Here</a> When I click the link the icon stops. ...

jQuery/JavaScript Date form validation

I am using the jQuery date picker calendar in a form. Once submitted the form passes params along via the url to a third party site. Everything works fine, except for one thing. If the value inserted into the date field by the datepicker calendar is subsequently deleted, or if the default date, that is in the form on page load, is delet...

Javascript: Dynamically created html elements referencing an instantiated object

(For further background, this relates to the same piece of work as a previous question) I'm creating a JavaScript based webchat system using jQuery to make life much easier. All the webchat JavaScript code is in an external js file, which is then referenced and instantiated by the html page. <html xmlns="http://www.w3.org/1999/xhtml"&g...

Measuring when only certain page elements have loaded

We use a modified version of Jiffy to measure actual client-side performance. The most important thing we do is measure the time between when the request was received and when the page load event fires in the browser. On some pages we have iframe elements that point to external sites that we don't control - they sometimes take a long w...

Is there a way to have browsers ignore or override xml-stylesheet processing instructions?

I'm trying to write a bookmarklet to help some QA testers submit useful debugging information when they come across issues. Currently I can set window.location to a URL that provides this debugging information, but this resource is an XML document with an xml-stylesheet processing directive. It would actually be more convenient if the t...