javascript

How to close parent window on child window open using window.open()

Using javascript "window.close()" method after opening new window using "window.open", it serve the problem i.e. but it will ask a confirmation message to user whether he really wants to close the window or not... if user selects yes then the parent window will close and if not then he will remain on the same window and new window will n...

Javascript: XMLHttpRequest Task Switch

document.getElementById('contactButton').value = "Sending"; xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,false); xmlhttp.send(null); function stateChanged(){ if (xmlhttp.readyState==4) { var response = xmlhttp.responseText; if(response == "true"){ document.getElementById('contactButton').value = "S...

Clear contents on click

All, In the following code <INPUT TYPE="radio" name="1" id="1" VALUE="1" <?php echo $checked1 ?>><font size="2">1</font> <INPUT TYPE="radio" name="2" id="2" VALUE="2" <?php echo $checked2 ?>><font size="2">2</font> <TEXTAREA name="names" id="names" rows="15" cols="65"><?php echo $names ?></TEXTAREA> If the radio button 1 selected for...

Embed ASP.NET server code in JavaScript

I've embeded the following server side code within <script> tag. <% Dim dataTable As DataTable = cTab.getTabs(Session("UserID")) If (dataTable.Rows.Count > 0) Then For i As Int16 = 0 To dataTable.Rows.Count%> { contentEl: 'tab'+'<%dataTable.Rows(0)("TabID").ToString()%>', title: '<%dataTable.Row...

Implement javascript sorting in a asp.net grid view

How can I accomplish gridview sorting in client browser using javascript ? without using inbuilt gridview sorting method. I really dont want the gridview to go to the DB each time while sorting. ...

How to make a graphics element draggable with google-closure?

How to make google closure graphics elements draggable and respond to events otherwise? Here's what I have so far. I have the circle, but can't drag it yet :). Thanks. goog.require('goog.dom'); goog.require('goog.graphics'); goog.require('goog.events'); goog.require('goog.fx.Dragger'); goog.provide('graphics_test'); graphics_test = f...

How to create a Jquery slideLeft delete for list item?

Hi I am trying to create a page loading my image, content, and the delete option. The image url and content are output from database. What I want to need is that on clicking of the delete the image, it would render animation to slide left showing the the image has been removed. My code so far ... Jquery Script: $(function() { $("#sorta...

how to add another event listener after added once..?

Hi all, I'm new to Javascript and also Maps in Google. my task is : to allow user to add marker on the map display an info window when the user click on the marker display 'Kuala Lumpur City Center' in the info window if the marker pointing to the Kuala Lumpur City Center and 'Unknown location' for other locations. My problem is I ...

jquery icons in jquery tabs problem

when i put jquery icon on my website it looks fine, but when i put icon inside jquery tab, icon image is moved few pixels left has anybody solved that problem already? thnx! ...

Algorithm for building tree hierarchy based on URL paths

This is related to http://stackoverflow.com/questions/711793/parse-url-strings-into-tree-hierarchy But i'm implementing in javascript, therefore require some algorithm here instead of using SQL functions. ...

enable/disable textbox

All, How to enable/disable textbox onclick of this radio button i.e, if radio button is selected then the textbox should be enabled else disabled <INPUT TYPE="radio" name="type" id="type1"> <input type="text" name="name" value="<?php echo $name?>" onChange="javascript:enableField();"/> ...

Cufon.refresh() don`t work in IE8

Hello, I need to refresh Cufon fonts after getting AJAX data. Unfortunately simple Cufon.refresh() don`t work in IE8. Debugger says, tah the line 1191 sStyle.width = roundedShapeWidth; has Invalid argument. How to fix it? ...

Reversing words in a string

Hello, does anybody know how can I sort words in string using javascript, jquery. For example I have this: var words = "1 3 2" Now I want to reverse it to this: var words = "2 3 1" Thanks ...

Why is Firefox is requesting a bogus URL from an IMG src in JavaScript code?

I'm getting weird 404 errors on my site for the following URL: GET /%27%20+%20item.icon%20+%20%27 HTTP/1.1 I've got some corresponding code in my HTML file: <script type="text/javascript"> function foo(item) { return '<img src="' + item.icon + '">' : ''; } </script> Seems to be coming from FireFox 3.5/3.6 on Windows only, ...

Recreating the Javascript-powered 360° VR view from the iPad gallery.

On the iPad gallery at http://movies.apple.com/ipad/gallery/ there is a nifty 3D-ish view when you click on the "360°"-Button on the lower right. It seems to be built with Prototype, some custom JS and 180 single JPEGs. Now, I don't want to steal Apple's code, but I really would like to have a similar effect. I'm afraid recreating the e...

Richfaces column Filter: How to fire an event on intro key

I have a rich:extendedDataTable and I am using column filtering. I want the filter to be fired once the user enters the "intro" key, but in javascript there is no such event. I want to do so because if I use events such as onkeyup I get too many requests and I have problems because of that. I'm using richfaces 3.3.0GA and facelets. Thi...

How to integrate support for Autopaging Plugins

How do I make my website compatible with all those autopaging plugins out there that load the next page beneath the current, thereby saving a page reload? ...

How to reset all checkboxes using jquery or javascript?

How can i reset all checkboxes in a document using jquery or javascript? ...

Returning a variable from an ExternalInterface.call() back into Flash

I'm calling a JS function with ExternalInterface.call and trying to get a return value inside Flash. When I trace out the op variable I get 0 instead of 500. Is there something wrong with my embed code? Embed code: <embed src="/sites/default/files/flash/flashgame/Preload.swf" width="975" height="572" align="middle" FlashVars="entry=log...

Integrate Javascript resources in HTML: what's the best way ?

Hello, I'm working on a project which uses many scripts (Google Maps, jQuery, jQuery plugins, jQuery UI...). Some pages have almost 350 kB of Javascript. We are concerned about performance and I'm asking myself what is the best way to integrate those heavy scripts. We have 2 solutions: Include all scripts in the head, even if they a...