javascript

How do I border an image by selecting a part of the title?

Hi all, hope you can help me solving my problem. These two images are linked somewhere on a site. <a href="?FRUIT=banana><img height="40" src="../../banana.jpg?format=raw" title="Banana - yellow"></a> <a href="?FRUIT=apple><img height="40" src="../../apple.jpg?format=raw" title="Apple - green"></a> I want to border them to start wri...

Regex question with using jQuery

I'm trying to create a Regex with jQuery so it will search for two words in an attribute of an XML file. Can someone tell me how to return a result that contains BOTH words (sport and favorite) in any order and any case (upper or lower case)? var regex = new RegExp("sport favorite", 'i'); var $result = $(data).filter(function() { ...

How do you get a dynamic id with getElementById in Javascript?

I need to get a dynamic value in the document.getElementById in Javascript. However, when I put a variable it does not work, like so: var = myVar; myVar = 'test'; document.getElementById(myVar); How can I implement this? Many thanks ...

Google Maps Circle Overlay and Vincenty Formula

Hi - I'm using the Circle overlay as part of the V3 of the Google Maps Javascript API (i.e., see below - we have a subsequent call that actually sets radius/etc.) to display goe-spatial locations in our application. var circle = new google.maps.Circle({ fillColor: lCircleColor, strokeWeight: 2 }); We also have a ...

updating fields automatically

hi im new to programming i have this small system for room reservations (school requirement). i have this question that is it possible to update the fields of my table on specific date? i have three tables naming users , reservations, and rooms. i want to update the field of the rooms on specific date, like if the date_out in the rooms ...

jquery - Empty responseText in XMLHttpRequest object when server returns 500

I have to make SOAP calls from javascript between different domains. On the server side there is a list of allowed domains, methods and headers which are included in the response by a filter. It works well (even between different domains) when the response code is 200 but when an exception is thrown on the server side the xhr object has ...

How can i bind an event to an element inside a local iframe?

Firstly both the parent page and the iframe are hosted on the same server (my localhost on WAMP) so same origin policy should not be an issue here. I can't get the trigger to work. My iframe has the id of iframe. $(window).load(function(){ //iframe ad hovers $('#iframe').contents().find('body div').click(function(){ alert('do s...

How do I get the http return code from an XHR object in mootools

I am doing an AJAX request. In my onFail event of the Request I catch the XHR object. What is the name of the member in this object that holds the code. For that mater, I could not find a documentation that shows the list of members in that object. ...

How can I have my links display a little transparent box on a:hover?

I'd like to display a little tooltip similar to this: That little black box appears when I put my mouse over it. How can I achieve this? Is it using jQuery or MooTools or what? Thanks from this beginnig web designer! ...

javaScript for ADF Faces 1.1 within a loop.

Hi, I am having issue with my js function within a ADF Faces af:interator. I have 3 controls within an af:iterator (af:ouputText, af:inputText, af:selectBooleanCheckBox) and I would like to have a js function on the checkbox so that when checking the checkbox, the text of the ouputText will be copied into the inputText. The issue here i...

jQuery 1.4.2 fadeIn(), show() Failing in Chrome when using easing plugin 1.3

Recently notice that all fade related content is breaking in Chrome with the error Property "undefined" of object is not a function. Can anyone by looking at this error thrown in Chrome tell me what is the problem? Uncaught TypeError: Property 'undefined' of object # is not a function: swingpublic/javascripts/jquery/jquery.easing-1.3....

Inserting JavaScript into a PDF file with FOP

Hello, Does anyone know how to add JavaScript to a PDF file with the Apache FOP framework? We are already generating PDF files from our application which are presented to the user. But in addition to that we want to include the option to automatically print the document when it opens. After a lot of googling the only useful site we f...

accessing the parameters of a JSON call in the web method

I don't need anything fancy or complex, I'm just trying to pass a simple string across as a parameter to my web method. How can I do it? Here is the web method call [WebMethod] public static ArrayList GetColumns(string TorVName) here is the JSON call: <script type="text/javascript" language="javascript"> var qs = ne...

getting access is denied error on IE8

I have a html form (upload.htm) with a html file upload control inside of it. <form id="frmupload" name="upload" enctype="multipart/form-data" action="uploadhandler.ashx" method="post"> <input id="uploader" name="uploadctrl" type="file"/> </form> There is also one javascript method in the above page which goes like: function perf...

setting javascript variable name from a variable

Hi is it possible to set a var name from another variable? Such as I have the var test with different numbers each time the function is called so I want the number to be a variable name e.g. var test contains ' 1 ' so the new variable would be var 1. I then want to add a word to this number "word" to make the new variable become var 1wo...

How can I merge two versions of a file in PHP or JavaScript?

I'm trying to code a site that will allow multiple people to be working on a file at the same time. In doing so, the biggest road-block I have come across is merging the new versions of the files, version-control style. I have been unable to find anything in the vein of a built-in JavaScript or PHP function that will help me with this....

msn plus script read/write memory

hello, I'm writing on a MSN Plus script, which is in fact javascript. For interop with Windows there is a class called Interop. With its static function Call one can call s specified function in a specified dll with up to 12 arguments. My goal is to write a script which gets a process name out of the PID. I've done everything right, but ...

why is my button losing focus?

This is what I want to happen.. When a user hits 'enter' a 'SearchForItems()' should trigger. What is happening is another control, with 'other button', on the page gets focus returned to it anytime any other element is tabbed out of or after onkeyup. I am having to force focus on the 'Search button' on page load, but after that any ti...

Determine if two strings are similar in Javascript?

Let's say I have two strings, is there any way to check if they are at least 90% similar? var string1 = "theBoardmeetstoday,tomorrow51"; var string2 = "Board meets today, tomorrow"; Thanks, Tegan ...

how can i load <script>'s into an iframe?

I've got the logic working to append into my iframe from the parent this works: $('#iframe').load(function() { $(this).contents().find('#target').append('this text has been inserted into the iframe by jquery'); }); this doesn't $('#iframe').load(function() { $(this).contents().find('body').append('<script type="text/javascri...