javascript

How do I execute javascript in a dynamically-added User Control

I have a GridView of thumbnail photos within an UpdatePanel, with clickable icons in each row which each load a User Control containing a small Google Map into the relevant row. The idea is that the user can geotag (by clicking on the map) any photo in the GridView. In the map User Control, there is some Javascript initialising the map...

Using Javascript, how can I simulate clicking on a server-side link button by using eval function in client-side?

hi all vascript, how can I simulate clicking on a server-side link button by using eval function in client-side? ...

Floating Characters in CSS and Javascript

I'm working on an English/Thai phrase app. In addition to displaying both English and Thai text, I need to display Phonetic text. The Phonetic text is English characters with arrows indicating inflection above the syllables. Example: knuckles ↘      ↑ kaw-new In that example, the falling arrow should be centered above "kaw" and th...

How to show a message only if cookies are disabled in browser?

How to show a message only if cookies are disabled in browser? like http://stackoverflow.com show if JavaScript is disabled. ...

navigate away alert without saving modifications

hi friends, I'm developing a website in php. I want to show a message something like javascript alert, when a user tries to edit or add something in a form and tries to navigate to some other section without saving the modification, i want to show a message to them, that you are about to navigate about from this page, your modificati...

Questions every good web UI developer should be able to answer

By "web UI developer", I mean someone whose primary job is to craft pages using HTML, CSS and JavaScript. They should probably be able to learn enough PHP or Rails or something to get by when creating pages that draw their information from a more sophisticated back-end, e.g., <div>Your <?=$subscription['title']?> Subscription</div> Th...

Calling a javascript function from a textbox in winforms

I have textbox in one of my forms and i want to call a javascript function from a javascript file... My code is this.txtbox.Text = ""; this.txtbox.Location = new Point(10, 20); this.txtbox.Size = new System.Drawing.Size(200, 100); this.txtbox.Multiline = true; this.Controls.Add(txtbox); this.txtbox1.Text = ""; ...

How to remove a YUI Chart from a page

I need to create and remove YUI charts from a page. To remove, I am doing $('.chart').remove() to get rid of the containing DIV. However, this raises a null reference exception in this script: try { document.getElementById("yuiswf1").SetReturnValue(_flash_toXML(YAHOO.widget.SWF.eventHandler("yuiswf1",({category:"info",message:"resize...

how to acess parent window object using jquery?

Hi how to acess parent window object using jquery? This is my Parent window variable , I want to set its value after closing child window . $('#serverMsg').html('some text here'); thanks ...

What does the $() function do in JavaScript?

What does the $() function do in the following example? function test(){ var b=$('btn1'); eval(b); } ...

Why don't we just stop using the word JavaScript, in favor of ECMAScript?

The question says it all. ...

showing images moving using java script

i want to Create new page named “MySlidShow.htm”, and put link to in PhotoGallary page. The slide show page has four links (previous, Start SlideShow, End Slide Show, Next). When user put the mouse over an image show this image description and date taken below it and pause the slide show if it is running, and when the moves the mouse awa...

Optimum way to compare strings in Javascript?

I am trying to optimize a function which does binary search of strings in Javascript. Binary search requires you to know whether the key is == the pivot or < the pivot. But this requires two string comparisons in Javascript, unlike in C like languages which have the strcmp() function that returns three values (-1, 0, +1) for (less than...

Make a html page with content() and jquery

Is there a way to make an html page from the contents() object?? for example iterate over $('body').contents() object and make a output like this: <body> <div>text<a href=#></a></div> <p>%^$$</p> .... </body> thanks!!! and sorry for the english! ...

JQuery - accessing a VAR in a function which I will need in another function?

Ok so in my html/js i have a form that updates based on the users previous selection. On the last stage i have a select menu where the user will choose their city. I have stored the value of the selected item in my Options list with the id #myCity to the following. ('#myCity').change(function(){ var CityValue = $("#myCity").val(); ...

Sites with hideable announcements/tips

Does anyone know of any site that uses javascript to generate a tip/message/announcement block that has a 'Hide this' option? Preferably like Stack Overflow where other containers get shifted up when the tip/announcement is hidden. I'm just trying to compile a list of sites using that feature. Thanks ...

MooTools: destroy() and events

When I .destroy() an Element object in MooTools, does .destroy() automatically internally call element.removeEvents(), or do I need to keep this in mind. (I'm removing elements from the DOM that have previously had element.addEvent() called.) ...

Grails + Google Maps API

Hello, guys. I`m trying to dynamically represent the changes of coordinates of a groovy domain object via Google Maps API. The object has fields: Double lat Double lng and a method: void flyTo(lat, lng){ Thread.start(){ while (locked){ changeCoords (this) this.save() } } and here is a JS to repopulate changes to ...

Multilanguage sites: Left-to-right and right-to-left

I see some good suggestions in SO for creating multilanguage websites in JavaScript including this article on JavaScript internationalization. However, I am finding it more difficult to determine best practices for developing multilanguage websites where one of the languages is read left-to-right and another is read right-to-left. Do y...

How to give css style on any X/HTML element if javascript is disabled?

i want to do it from external css file. i have a div#abc in main css but i want to set display none for this div only if javascript is disabled ...