javascript

What's the best way to "turn off" a javascript function triggered by an event on the page

I have a nav element that onmouseover I'd like to disable the onmouseover of nearby images. I was thinking that I'd just loop through and collect the images and set their onmouseover to '' and then onmouseout of the nav element set the images onmouseover back to what it was. Is there a better way to just get the images onmouseover func...

Client-side Development Platforms based on JavaScript

I'd like to set this up as a post where all known JavaScript client development platforms could be listed by company/organization/ecosystem. * anything that is HTML/JavaScript-based. Microsoft Windows Gadgets* HTA - HTML Applications* Adobe Adobe AIR* Can be done with only HTML/JS but can also can use Flex/Flash Adobe Director Adobe PD...

Access SVG DOM when using ASV plugin in Firefox

I have to develop for Firefox using the Adobe SVG Plugin 6. When using Firefox's native SVG viewing capabilities, I can simply look at document.documentElement, which will give me the root svg element and from there I can navigate the DOM to where I want. With the ASV in Firefox, it appears to make a skeleton HTML file with an embed in ...

javascript: passing a function with parameters as a parameter?

Hi, Is it possible to pass a javascript function with parameters as a parameter? Example: $(edit_link).click(changeViewMode(myvar)); Thanks. ...

Prototype.js Exception in IE browser ( Version 6) on loading webpage

I am trying to load a webpage using prototype.js in the header after the title. I keep on getting an exception in the prototype.js within the CoreWrapper function, where the eventID is seen as a null. This only happens once and then seems to be okay, thereafter. I have noticed that there is no problems loading the same webpage using ...

another Bug in jquery validator?

i use remote method of validator for checking if username exists in DB my scenario: form with one field (username of course) i filled field it passes validation, but i don't sending form yet going to DB inserting username that i filled in form that i still don't sent yet returning to my form press on submit btn voila, it pass validat...

YUI Event Utility problem

I create a button, when clicked, it activates a backup feature. My problem, backup is launched before I have clicked to this button. How, do I fix this problem ? Any Idea ? Here is my code (fragment) : (button) : var oSaveCuratedQuery = new YAHOO.widget.Button({ type: "button", label: "...

Click Nav Menu is Misbehaving

I posted here recently when I was having trouble getting a script to work. It was supposed to, with the aid of PHP, detect what page the user was on, select the nav menu list item with the same id, and then set the id of the list item to 'cur', which would attract the appropriate styling. I got that to work, as can be seen here: link t...

Javascript redirect vs PHP redirect, which would search engines see as regular content

I'm guessing that using PHP's header("location: here.html") would be much better javascript's window.location("here.html") as far as search engine visibility goes. I would assume that the server redirect would show google the correct content and the javascript redirect would be read as a page with the javascript redirect code in it. Rea...

Javascript Menu

I am working on a page, which has a link which reads "update". When users click this link, I would like a form to use a slide effect and appear underneath the link. When the form is submitted, it updates the db, and the menu vansihes. I know this can be done with javascript, but I am not sure how to implement it. Much thanks ...

Google Analytics and Hubspot Delay Javascript Execution

We are trying to use google analytics and hubspot on our site but they bith seem to delay the execution of the scripts on our site. We are using jQuery and the "ready" function to delay our scripts until the page is ready. Are there any ways we can delay the analytics scripts and have our scripts execute first? Thanks. ...

Table - fixed header, scrollable body, most robust/simple solution?

Hi guys, Looking for a solution to create a table with a scrollable body, and a static/fixed header. Searching around seems to produce MANY flaky pieces of code, either not working in IE, requireing a huge amount of Javascript and tweaking, or a silly amount of CSS hacks etc. To be honest, if it's a case of CSS hacks or Javascript, I ...

How can I automatically answer a password prompt from an embedded item in an (X)HMTL page?

I have written a web page that displays images from several servers on my network via simple img tags with appropriate href values. The servers require authentication before they will send the images. It works alright, except on first load the page presents the user with a series of password prompts (one for each server). The user c...

Positioning Divs semi-randomly, without overlaps

I have a page which has DIVs which contain short phrases (one-two words) of varying font sizes, which need to be positioned left-to-right according to a numerical parameter, and vertically so as not to overlap. It's like a tag cloud, but there's information contained in the y-axis as well ("coolness" in this case - http://cool-wall.apps...

Whats wrong with this jQuery validation code? regexp.exec(value)

Value will be anything and matches is null. The point of this is to split up a string like "1991-12-01" and make sure that all of the parts of the string are valid dates. dateISO: function(value, element) { if (this.optional(element)) return true; var regexp = new RegExp('^\d{4}[\/-](\d{1,2})[\/-](\d{1,2})$'); var matches = ...

Change textbox's css class when ASP.NET Validation fails

How can I execute some javascript when a Required Field Validator attached to a textbox fails client-side validation? What I am trying to do is change the css class of the textbox, to make the textbox's border show red. I am using webforms and I do have the jquery library available to me. ...

Truncate a string straight javascript

I'd like to truncate a dynamically loaded string using straight javascript. It's a url, so there are no spaces, and I obviously don't care about word boundaries, just characters. Here's what I got: var pathname = document.referrer; //wont work if accessing file:// paths document.getElementById("foo").innerHTML = "<a href='" + pathna...

Set variable in parent window from iframe

I have a parent document with an embedded iframe. Inside the iframe I have an upload field. Once the user selects a file to upload, I trigger a jQuery change event. On that event I want to set a variable in the parent window to true, so that the parent knows that the upload has started. Does anyone know how to do this? Was trying th...

is there a simple alternative to TinyMCE?

I'm looking for a more simple text editor than TinyMCE for use with Rails, I find MCE editor, bloated, cumbersome, and problematic with many things. ...

How can I invalidate a page in the browser cache from the client side?

I need the client (using javascript) to invalidate a page it has and essentially fetch a new version? I thought I could do it all with headers: http://stackoverflow.com/questions/1295397/invalidating-cached-content-if-modified-headers If there NO way to have the browser refresh its current cached version, with out making a new request ...