javascript

How check if ajax.googleapis.com blocked and use my hosting of jquery?

I use http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js but some compaty may block this site, so in this case I want to use my local version on jquery /JavaScripts/jquery.min.js. How can I do it? ...

Prototype hide/show

Hi, I am a Javascript/jQuery/Prototype newcomer and I have a page that has a Prototype function to get info from a database and put it into some input fields. This was made before I came to work on this site and now I've been asked to add a hide/show div function. I tried it in jQuery and there were clashes with the two frameworks, (as ...

Could You Quickly Test a Web Page in Apples Safari 3 [Simple Pass:Fail]

I am not fortunate to have access to Apple Safari 3.0 [which has a WebKit version < 525]. Would someone kindly test a Web page for me, it will return your userAgent string and a simple pass:fail. In WebKit versions < 525.… [<= Apple Safari 3.0] it should fail and >= 525.… [>= Apple Safari 3.1] it should pass. I appreciate all your help...

Can i do 3d swivel animations along the z-axis with HTML5 / js?

http://gizmodo.com/5523721/microsoft-office-on-windows-phone-7-looks-fantastic I was wondering if it was possible to obtain an effect similar to the windows 7 mobile examples above without using Flash. I would like to have content swivel in along the z-axis. Thanks! ...

Set timeout on third-party file request with jQuery

I'm trying to integrate a script file hosted by a third party into a new web site. Currently, I'm adding a SCRIPT tag to the DOM for that third-party script file on document ready: $(document).ready( function() { var extScript = document.createElement('script'); extScript.type = 'text/javascript'; extScript.src = '...

Pull form from shadowbox, and submit it from the parent window

Hi all. I have a form in a shadowbox, and when the user clicks the submit button (or a link with an onclick, i don't mind) i want to step in, close the shadowbox, then submit the form data from the parent window. Can anyone tell me how to do this? I can't work it out. Something like this semi-pseudocode... $("#my_form").submit(funct...

Problem loading images from DOM

I have problem in loading images using jquery. My program is such that it inserts as well as deletes from the same form. When I delete an image and inserts the image and after loading the jquery function the deleted image is shown. I have found inconstency in dom and actual location. The browser loads the images from dom not from actual...

JavaScript keeps returning ambigious error (in ASP.NET MVC 2.0)

this is my function (with other lines ive tried/abandoned)... function DoClicked(eNumber) { //obj.style = 'bgcolor: maroon'; var eid = 'cat' + eNumber; //$get(obj).style.backgroundColor = 'maroon'; //var nObj = $get(obj); var nObj = document.getElementById(eid) //alert(nObj.getAttribute("style")); nObj.style...

Why .data() function of jQuery is better to prevent memory leaks?

Hi, Regarding to jQuery utility function jQuery.data() the online documentation says: "The jQuery.data() method allows us to attach data of any type to DOM elements in a way that is safe from circular references and therefore from memory leaks. " Why to use: document.body.foo = 52; can result a memory leak -or in what ...

Javascript BBCode Parser recognizes only first list element

I have a really simple Javascript BBCode Parser for client-side live preview (don't want to use Ajax for that). The problem ist, this parser only recognizes the first list element: function bbcode_parser(str) { search = new Array( /\[b\](.*?)\[\/b\]/, /\[i\](.*?)\[\/i\]/, /\[img\](.*?)\[\/img\]/, /\[url\="?(.*?...

What is the email limit on Google Apps Script?

Can someone tell me if there is a webpage that lists the official Google limit on emails sent from a Google Apps Script? In testing my little script I got a Service invoked too many times: email (# 59) and now I can't send any more emails. The obvious place for this information would be in the MailApp.sendEmail documentation. But, tha...

JavaScript and error "end tag for element which is not open"

I have problem with validation such code function show_help_tip(event, element) { var $e = $(element); var pos = $e.offset(); $('.body-balloon',$help_tip_div).html($(' <p>&nbsp;</p> ').html(element.getAttribute('title'))); $help_tip_div.css({position:'absolute',top:530,left:pos.left+$e.width()-20}).show(); } end tag for e...

Can I do a AcceptVerbs(HttpVerbs.Get/Post) and hijaxing on the same page MVC?

I am working with Hijaxing and I will have three buttons, Prev, Add, and Next. The hijaxing works with both the Add, and the Next button. Prev button is set to 'onclick="history.back(-1)" '. Add button is triggered by a '(Html.BeginForm("Add","Home"))' form with hijacking Jquery, which works fine. Next button does does the same as th...

how to change color of text following function in javascript

Ok before i make spaghetti of this code i thought id ask around here. ive made a quiz for an online site. The answers are stored in an array, and ive a function that checks the answers array to what youve clicked. then it counts them and gives you your score. but i want to change the clor of the right answer wen the user clicks the s...

DOJO.xhrPOST not working in android

In my JS i'm using this code try{ var xhrArgs = { url: "/mum/proxy/http/localhost:8080/com.error.android.mashup/xmlContentReader", postData: tmp, handleAs: "text", load: function(data) { // alert("data:"+data); }, erro...

jQuery ajax form submit - how to ensure dynamically loaded form's action is used

Hi, i'm having a problem with dynamically loaded forms - instead of using the action attribute of the newly loaded form, my jquery code is still using the action attribute of the first form loaded. I have the following code: //generic ajax form handler - calls next page load on success $('input.next:not(#eligibility)').live("click",...

Editing css by js in ie giving error

I need to do this: document.styleSheets[i].rules[1].style.cssText = "cursor: url(images/grabbing.cur), default !important;"; and if I'm checking: alert(document.styleSheets[i].rules[1].style.cssText); its giving: cursor: !important Why is it not setting the whole string in this css? It's a problem in Internet Explorer only, it wo...

Using a C++ class inside Javascript without an .idl

It is possible to call methods on a class whose interface is not exposed through an .idl file? Im my particular case, I'd like to use the @mozilla.org/gfx/fontmetrics;1 class, whose interface nsIFontMetrics doesn't have a correspondent .idl file. ...

javascript: How to assign a function to an element.

Hi, Here's what I want: I have an element in my html code, and I want to assign a function to the onClick event, depending on some conditions to be known down the road. For example <a href="" id = "element"><img .....> //other code </a> Then I want to do something like this <logic:equals some_condition> <script> ...

Is there a Firebug console -vsdoc.js?

If not, does anyone care to write one? I would do it myself...but I don't have time right now...maybe next week (unless someone beats me to it). If you are bored and want to compile the vsdoc: Here is the Firebug API. Here is a blog post about the format for VS doc comments for intellisense. Here is an example vsdoc (jquery-1.4.1-vsdoc....