javascript

Need a little help with anti email spam javascript

Hi, I want to protect my website against spambots with javascript. I found this code, I have two questions. 1 - Will this code protect my email adres? 2 - Can someone explain me how to add this line: <SCRIPT TYPE="text/javascript"> emailE=('info@' + 'friesecomputerservice.nl') document.write('<A href="mailto:' + emailE + '">' + email...

result of the sum

Why 9.1 + 3.3 is not 12.4 ? <script> alert( 9.1 + 3.3 ) </script> result: 12.399999999 ...and how should I sum it? ...

How to set the Google Map zoom level to show all the markers?

How do I set the zoom level to show all the markers on Google Maps? In my Google Map there are different markers in different positions. I want to set google map zoom level based on the range of markers (that means in the view of google map, i want to see all markers) ...

FullCalendar JSON Event Source Problem

Hi All, I have this problem of my FullCalendar not showing any events on IE or Mozilla. It works well with Chrome though. I have a JSON source generated by the following php code: $handle = opendir('./stat_files'); while (false !== ($file = readdir($handle))) { $filenames[] = $file; } unset($filenames[0]); unset($filenames[1]);...

Javascript document.domain clarification

I have a domain foo.com on server bar. I have a subdomain api.foo.com which has a CNAME entry pointing to ghs.google.com (as the subdomain is being used by Google Apps). I am trying to make jQuery.get() calls from search.foo.com to api.foo.com. The calls all seem to go through properly, and the callback function is executed each time, b...

XForms: how to deal with instance data that changes?

Hi all, At the moment I am working on an XForms application to mutate XML data. This data comes from a local XML file. The file is exported from another application in a static way and read into the application. The problem is that every time the data changes (the XML structure remains the same). How can I fix this in XForms? I use XSLT...

How to detect height of page inside iframe?

I have a iframe in a page <iframe src="page.aspx" > I don't know how big the thing is going to be. How to get the height? May be jquery would be good here beacuse of browser indifferences. // sth like this. currentfr.contentDocument.body.offsetHeight // NS currentfr.Document.body.scrollHeight // IE ...

Script to automate actions on ajax-enabled website

Hi Here in Switzerland, people under 26 that have a cell phone contract with Swisscom can send 500 sms per month for free using the website https://xtrazone.sso.bluewin.ch/. Until a few days ago, this site was structured quite simply, it had a login and an inputbox to enter the sms. That's why i wrote a perl script (http://github.com/g...

i cant get my javascript eventlistener to work properly

this has got me stumped, ive tried lots of different things, but cant get this to work. can anyone help? no matter what i try i cant get the click eventlistener on the link to fire. the code is in a greasemonkey script. i believe i have to use the closure method to be able to refer to the function dropit in the greasemonkey script, as it...

AJAX call that returns flash video

Hi I have an AJAX web service call that returns a chunk of HTML that I then apply to a DIV element on my page. This works fine for any html element except a flash video which comes up with 'Movie not loaded'. I've double-checked the html that is being returned and it's all fine, and it works if I don't use AJAX, but when I use AJAX an...

Copy and extend global objects in javascript

Hi, is there a way to copy a global object (Array,String...) and then extend the prototype of the copy without affecting the original one? I've tried with this: var copy=Array; copy.prototype.test=2; But if i check Array.prototype.test it's 2 because the Array object is passed by reference. I want to know if there's a way to make the ...

Element.insert at bottom-1 with prototype

Hi, I want to insert an Element at the position bottom -1 of his parent. The following code insert at the bottom el.insert({bottom: content}) thanks ...

Javascript or CSS static bar which remains constant in terms of position

Hi there, I've seen so many times that some websites use a kind of button or a kind of bar which always float to a specific position like left edge of screen or at the bottom of the screen and whenever we scroll down a page it remains constant in terms of position.. How to apply this either by CSS or javascript or jquery. Thanks in ad...

firebug console error

Hello Stack Overflow, I try to learn to use Firebug (debug). I try to run "bennadel Firebug debug example" . URL SCRIPT http://www.bennadel.com/blog/1459-FireBug-s-Console-dir-vs-DOM-Tab.htm. With: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2) Gecko/20100115 Firefox/3.6 GTB6 (.NET CLR 3.5.30729). Firebug 1.5.2. I run " FireB...

How can autofill another text box as I type in the first textbox in jquery and ajax

How can I generate a result from jquery + ajax in a another text box <form action="someanotherpage.php"> <input type="text" name="data" value="" id="data"/> <input type="text" name="response_data_here" value="" id="response"/> <input type="submit" value="Apply" /> </form> EDIT: I edited some content..Im so sorry forgot to...

jQuery dynamically create table/tr/td or etc and append attributes

Hello, In an example I am having this structure (small example): <table id=example> <tr class="blah test example"><td>Test1</td><td><a href="url">LINK</a>Test11</td></tr> <tr class="blah test example"><td>Test2</td><td><a href="url">LINK</a>Test22</td></tr> <tr class="blah test example"><td>Test3</td><td><a href="url">LINK</a>Test33</td...

Getting jQuery's functions to run when page is loaded in a div

I have a site where users can log in and check on outstanding support issues they have raised with us, on this site is a page to manage per company contacts. Whilst updating the site i have started using jQuery to load sub pages so that the user doesn't get a page refresh everytime. I've started to run into problems loading my JavaScript...

Toggle Checkbox

Hello all, I have 4 checkboxes and I wish to toggle them (checked or unchecked) and they should all be the same what ever state they are in. I have this so far: var toggle_click = false; function check_them(element){ if(toggle_click){ $('#'+element+'_1').attr('checked', true); $('#'+element+'_2').attr('checked', t...

How to "enable" HTML5 elements in IE that were inserted by AJAX call?

IE does not work good with unknown elements (ie. HTML5 elements), one cannot style them , or access most of their props. Their are numerous work arounds for this for example: http://remysharp.com/2009/01/07/html5-enabling-script/ The problem is that this works great for static HTML that was available on page load, but when one creates H...

Check if Table tr has class then remove and add new class on Hover event

Hi, I'm trying to highlight table rows on mouse hover. The each row (tr) has a class either "even" or "odd" already. So, to highlight the row on mouse hover, I need to remove the CSS class "even" or"odd" from the row first. Please take a lot at my script: $('tr').hover(function() { if ($('this').hasClass('even')) { $(this).remov...