javascript

JQuery interface for finding location in google map.

Can anyone please suggest any jquery script for capturing google map location from the user? To be more specific... I want website user to locate their addresses online using Google map so that I can store address' location in the db. It should be very simple approach with following steps.. User provides the address in the address fie...

Mobile technology products using PHP/Javascript/jquery

Hi All, I wanted to know the mobile technology products which are developed using PHP/Javascript/jquery. Which are latest mobile products are available in market developed using above mentioned langauges. Are iphone,blackberry,nokia and etc uses these above technologies to develop product and which are those products. If anyone has a...

Speed difference between very similar jQuery expressions in IE

In IE, compare the speed of execution of an expression along the lines of $('div.gallery div.product a"); to the very similar $('div.gallery').find("div.product").find("a"); Sometimes the second variant runs faster, sometimes slower. Often the speed difference is a factor of 2 or more. What is going on? ...

Problems with javascript inside echo

I want to echo the following code: <a href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url='+encodeURIComponent(location.href)+'&amp;title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false;" class="delicious" target="_blank">...

JS - Check if an array position contains a word and then return another word.

Hi guys! Ive got this problem where I need to check an arrayposition if the string contains this at the start: as-se-gbg-XXXXXXXXXX-XXX-XX I just need to check if the string contains the as-se-gbg stuff and then return it as Sweden, Gothenburg. I tried to use this method: if(b == "as-se-gbg") { return("Göteborg"); But the == opera...

Is there a reasonably safe way of authenticate a homepage using javascript?

Hey! I am very new at javascripting and I would like to know if there is any way of authenticating a homepage using javascript? I do know a couple of ways but they are extremly easy to "hack" because the username and passwords are stored in the script itself - as arrays. Do you guys know any good ways of authenticating just a single su...

very Strange problem with text area value and javascript

i have a html form <form action="" method="post"> <textarea id="content" name="content"></textarea > </form> ok it work good when making var_dump($_post); but the problem is when adding any js plugin on this textarea its not give me any out put this in my new script i cant know the reason i testes many plugins like text area resize li...

this.value is working on Firefox, but not in Internet Explorer?

I have an onChange event on a select. When I do an alert(this.value), it's working on Firefox, but not on Internet Explorer. Why not? This is the code: <select onchange="new Ajax.Updater('fiches', '/~project/index.php/folder/fiche', {asynchronous:true, evalScripts:true, parameters:'fiche=' + this.value});" class="input" id="fiche" nam...

Dynamic AdSense units

I have an OpenSocial application, and wanted to try AdSense in it. I can easily run Javascript, but cannot include HTML snippets directly. For this reason I am trying to come up with a script that would create a DIV that contains the AdSense ad. function adsense(w, h, slot) { google_ad_client = "pub-4815352041522054"; google_ad_slot = s...

Image change every 30 seconds - loop

Hey I would like to make an image change after 30 seconds... The code I'm using looks like this: Script: var images = new Array() images[0] = "image1.jpg"; images[1] = "image2.jpg"; images[2] = "image3.jpg"; setTimeout("changeImage()", 30000); var x=0; function changeImage() { document.getElementById("img").src=images[x] x++; } An...

Android, WebView, 'onlick' inconsistent firing

In my JavaScript code I set 'onclick' handlers on HTML DOM elements. In Froyo these handlers always 'fire' when their elements are clicked w/i WebView, as expected. In pre-Froyo, including 2.1 I am confronted by 'magic' :-( Sometimes the handlers are activated and they successfully log to console.info as well as call Java callbacks, some...

how to set textbox value to empty(blank) using javascript in facebook

I want to set my textboxes empty(blank) once user posted or skipped feed box in facebook. i m using following code: var attachment = { .........some code here............ }; Facebook.streamPublish('', attachment,actionLinks,null,null,clear); } function clear() { document.getElementById("question").setTextValue() = ""; } b...

how to create google effect?

Possible Duplicate: Fade in on mouse movement (like on google.com) i wonder how to create google effect on my home page. i want exacty same effect. explain me in detail to use it on my home page. thenks. ...

Rendering xhtml compliant pages with XSLT won't render correctly past inline javascript block

I'm currently in the process of updating a (lot of) old xsl+html code to render xhtml compliant code but am running up against a problem where pages include inline javascript. Some of the javascript can be removed from being inline and placed into linked js files. However, there are a number of places where xsl elements are used inside...

setTimeout not working with jquery

I have a jquery extended function that works perfectly but when i pass it through the setTimout it does not wait the the specified period and runs straight away. jQuery(document).ready(function($) { setTimeout($.mainmenuslider({ trigger:'close' }),6000); }); Any Ideas??? ...

Select box's selectedIndex being set to -1 when option removed in Internet Explorer

Hi guys, I have two select boxes (available products and selected products). The use moves the items from one listbox to another. This works fine but in IE when i do a .remove(selectedIndex) (Javascript) on the option they selected the selectedIndex of that box gets set to -1. I want the listbox to remain in the same position but just ...

Javascript/jQuery Data Storage Method (Database)

Hello! I'm currently designing a website that would involve storing a long list of names (with no additional data) on the server and then outputting them to the client browser on request. To store these names I obviously would need a data storage method of some sort and I was just wondering, as the entire site is coded in javascript/jq...

HTML form data to recursive json dict

I would like to convert flat form data to recursive JSON data in python or javascript. This JSON data can later be interpreted by a template engine (google for tempest, it has django like syntax). There are plenty examples to convert flat data to recursive data, but the problem is it can't be a dict or list only. I tried to do it in man...

What is the preferred way to enqueue just a function in scriptaculous?

I have an application, that uses scriptaculous' effects queue to render the view of a game. Ajax-requests read events from a server, from these events, effects are generated and enqueued. Some events have nothing to animate, only code to execute. It is possible, by creating a Dummy-effect, and use the afterFinish option. Is there a be...

Call Javascript function from code-behind in C#.NET

Hi I am trying to call a javascript simple alert function when I catch an exception in my C# code as follows: inside my function: try { //something! } catch (Exception exc) { ClientScript.RegisterStartupScript(typeof(Page), "SymbolError", "<script type='text/javascript'>alert('Error !!!');return false;</script>"); } Is...