javascript

How can I use html/javascript to make <a> link trigger an embedded flash object?

Using HTML/Javascript I want to make an link trigger a flash object that is normally triggered by clicking on the flash itself. The flash objects is actually the "Call Me Now" button from Google Voice which looks something like: <object type="application/x-shockwave-flash" data="https://clients4.google.com/voice/embed/webCallButto...

How to make infinite movement of a div?

I am trying to make a webpage that uses a moving div that slowly moves to the left. There is also another div that moves on top of it to the right that gives a 3D effect (but that's beside the point). What I am trying to do right now has made a 7000px wide div that slowly moves to the left (animating the "right" property of CSS with jQu...

Getting elements by a partial id string in javascript

I have the followng code: var inputs = document.getElementsByTagName("input"); for (var i = 0; i < inputs.length; i++) { inputs[i].disabled = bDisabled; } I need to now add some logic to only disable the the inputs that have and Id of the form "bib*" where bib can be any character. Ive seen other questions where this is done with jque...

how do you pass binary messages to/from a javascript web worker?

I'm building a multi-threaded client side javascript application, and I would like to have a background thread pull binary data and pass it to the main thread. I know this can be done in other languages via serialization, but how do I accomplish this in javascript? ...

Why can't an iframe set its parent's location.hash?

I have a window containing an iframe, containing an iframe, like so: +---------------+ | Top | | +-----------+ | | | Middle | | | | +-------+ | | | | | Inner | | | | | +-------+ | | | +-----------+ | +---------------+ Top and Middle are on the same domain, but Inner is on a different domain. I need Inner to communicate w...

(Ruby, Rails, Javascript) Drag and Drop without bugging the server...?

Hi All, Is there an equivalent of "link_to_function" (instead of ":action") when using "draggable_element"? Basically I need to drag and drop some items and have it reflected locally without contacting the server. My current setup is that I have two DIVs with various list items. I have one full of items with domids "points[selected][...

Can I call the function Ready() again in jQuery

Hello All , I have this code $(".insert").click(function(){ $(".insert").ajaxStop(function(){ $(".load").hide(); }); $(".insert").ajaxStart(function(){ $(".load").show(); }); $.ajax({ type: "GET", url: "edit....

What is the easiest way to return server based error messages to a web based modal panel.

I've been tasked with adding a modal based UI feature to an internal application. The quick summary is that I am posting a form via a modal panel, and I'm wondering the best way to cleanly provide feedback. Firefox permits changing the page showing within the modal panel via a normal post, but IE opens it in a new window which seems ...

Using selenium's waitForCondition with an xpath

Selenium has some nice support for finding elements in a page via xpath selenium.isElementPresent("//textarea") and in ajax pages you can use waitForCondition to wait on a page until something appears selenium.waitForCondition("some_javascript_boolean_test_as_a_string", "5000") My difficulty is, I can't seem to get into a position to...

Identifying the anchor tag when href is called

Hi, How can you identify in a function whether it has been invoked by an anchor tag href? event is null in this case. So event.target and event.srcElement won't work. Code HTML <a href="SomeFunction();">Href works here</a> JavaScript function SomeFunction () { // I need to get the anchor element that invoked this funct...

Javascript String Validation

i have a string... i want to validate that string so that it should not contain certain characters like '/' '\' '&' ';' etc... how can i do that all at once??? ...

Execution JScript in SilverlIght Application

Hello! I try to make scriptable application using Silverlight DLR. When I try execute JScript code which contains two or more lines of code, execution only first line. For example: I had Compiled SL application written on С#. Main page contains Label named "lblMessage" and Button with Click event handler. private void Button_Click(obj...

Firefox shows waiting cursor and "loading.." even after post request is complete

I have a form to upload a file.The <html> is as follows: <div id="divModalPopup" class="ui-dialog-content" style="height: 139px; width: 268px;"> <form method="post" action="upload.php" target="uploadframe" enctype="multipart/form-data"> Please choose a file to upload [only zip with shape files and no folders]: <input type="fi...

Change and Keyup Event Handler in JQuery

Hi, I m using JQuery in my application .Also i am using Cakephp and Mysql. I m having a code like below in which instructions is a Textbox that when i type on it ,it will be shown in the Display panel ... $(".TextFieldSettings #instructions").keyup(function (){ instr=$(".TextFieldSettings #instructions").val(); $("#displayPanel ...

How to focus radio control using Javascript in IE?

Given the code below: <html> <head> <script> function test() { document.forms[0].TEST[0].focus(); } </script> </head> <body> <form> <input type="button" value="Test" onclick="test()" /> <input type="radio" name="TEST" value="A">A</input> <input type="radio" name="TEST" value="B">B</input> </form> </body> </html> In...

Script stack space exhausted firefox

i am working with a large XMl response from a webservice. when i try to get that using a url, after sometimes it displaya an error in Firebug that "script stack space quota is exhausted" how can i solve that???? ...

How to avoid javascript retrieving values from non-existing elements

Update: clarified question (I hope) Hi. I'm developing a plugin in Wordpress and I'm outputting elements according to user privileges A and B. In case of A, I ouput element "Foo". In case of B, I output element "Bar". Up till now, I haven't checked if an element exists before I try to retrieve the value. This of course gives me a java...

Validate URL with javascript and php

hi friends, I just want to validate url,for both folowing formats http://www.XYZ.com and www.XYZ.com i want this validation script in Javascript and PHP also. Thanks in advance. ...

how to transform array argu from object_c to javascript?

Now I want to transform a Array from object_c to javascript, just like label1 , label2 , label3... in the array. I use this method : WebScriptObject* win = [webview windowScriptObject]; NSMutableArray *nameArray; // in this have some file name : label1,label2... [win callWebScriptMethod:@"transArray" withArguments:nameArray]; and the...

setting classpath for java classes(jar file) in XUL, to access via javascript.

I am implementing firefox extension using XUL. I have set of java classes that is zipped as jar which needs to be accessed through javascript. If I copy my jar into jre's lib/ext then javascript will be able to invoke my java classes. If I remove from ext and package this jar in xpi, Javascript is unable to find the classpath for my ...