When viewing a site I am working on in any version of IE, I get a done with errors message and the only thing that seems to load is the background. Really not sure how to go about fixing this one, I am not even sure what the error means.
The error is an invalid argument on line 117.
It works fine in Firefox, Safari, and Chrome.
Her...
Hi,
I have encountered a problem using prototype AJAX when trying to include a lightbox on a link.
I have tested the lightbox works on the same page outside the script tags, so I know paths etc are correct.
When I click this link a box should appear asking if I want to proceed or cancel. However, instead it sends me to the actual p...
I'm looking to display multiple web projects (in this case a standalone ajax webmail client, and a standalone ajax webchat client). In the same browser window...
I would like the objects to be able to overlay one another (like the way google talk messages appear over gmail).
What direction should I consider going in? I'm thinking of u...
Hey, I'd like to change the font color or the responseText based on the result. For example, if the responseText is NOT FOUND, I'd like to font color to be red. Otherwise, it will be black. It's currently displaying the correct responseText; I just want to change the color when necessary. Here is my current Ajax:
function newXMLHt...
Hi
I'm having trouble setting something to float right in JS. My code is as follows:
var closebutton = document.createElement('div');
closebutton.style.styleFloat = "right";
alert(closebutton.style.styleFloat);
closebutton.style.background = "#f00";
closebutton.innerHTML = '<a href="">✖</a>';
titlebar.appendChild(closebutton);
...
I'm trying to add soft hyphens to break up long urls and other strings in some plain text.
function breakLines(str, num){
if(typeof num == 'undefined' || num == null){ num = 15;}
regex = new RegExp('(\S{'+num+'})(\S{'+num+'})','g');
return str.replace(regex, '$1­$2');
}
It works if I use the slash notation for the repl...
I am new to javascript and I came across these functions which, I believe, are for storing a cookie with a name in it (the name being 'value'). I just don't understand it! The functions are as follows:
Making the cookie
function setCookie(c_name, value, expiredays) {
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
d...
Is it possible to mix the concept of Unobtrusive JavaScript with the event model of ASP.Net?
...
I have a page that displays a list of locations chosen by the user, and for each location it also shows the map with a marker pointing to the address.
Everything works fine in firefox and opera, but in safari, chrome and ie the controls (zoom, move, the map options, the scale) are only displayed in one or two maps on the page (usually ...
Does anyone familiar with Lightbox2 (http://www.huddletogether.com/projects/lightbox2/) know how to trigger a lightbox onLoad and preferably with a 1 minute delay?
...
When linking to a resized image by PHPThumb to popup in a lightbox using either thickbox or colorbox, I am getting a lightbox come up with data and characters. I am guessing because thickbox does not see my image as a real image because it is outputted with the php extension:
includes/phpThumb/phpThumb.php?src=includes/kcfinder/upload/...
Yahoo mail is now injecting disgusting amounts of code including css and javascript into html emails.
I've found a way to over ride some of their css by writing styles using their class of .yshortcuts.
Now, I was wondering if there is a javascript call which would say "Stop all javascript functionality after this call"
I know, pretty ...
I'm just starting to learn Javascript; I do however have experience in programming using the C family of languages.
I'm basically trying to get a grasp on how the getElementById() function families work. To do this I'm trying to create a basic show/hide panel.
<div>
<div id="box1">
Title
<span class="time">Time</span...
Hello,
I am working on some JS to display a Twitter-eque error/success banner. I would like the banner to be visible at the top of the browser (FF, Chrome, Safari) for the duration of the time it is in view (including if the user decides to scroll somewhere else). I can't figure out the solution however.
Another issue I am having is wi...
I am working on a site where the client has a coupon code image on a product page and when the user clicks on the image he wants that code copied to the clipboard... is this possible?
...
I am considering using AHAH extensively on a project and am concerned about security. Couldn't an attacker inject malicious code into my response that would then be executed in the client? If my AJAX response is JSON, I don't have to worry about this because if things are tampered with the JSON will no longer be valid.
On the other hand...
What is the point in validating your HTML forms using Javascript, if you are always going to need to validate the forms using PHP anyway? I realize that you get a speed boost from this, and its more convenient to the user, but beyond that, is the time spent on it worth it? If anyone has any good evidence on this I would love to hear it.
...
I wrote a regular expression which I expect should work but it doesn't.
var regex = new RegExp('(?<=\[)[0-9]+(?=\])')
Javascript is giving me the error Invalid regular expression :(/(?<=[)[0-9]+(?=])/): Invalid group
Does javascript not support lookahead or lookbehind?
...
I'd like to know if there is a DOM event to listen for that tells me when a DOM element moves is repositioned or is resized on the page. I am not talking about an elements being drag/dropped. An example is if a have a list of three items on a page, and I use JS to remove one of the top two list items from the page (or hide it or whatev...
Hi, when trying to do a search box in a Rails project, search is based on input id numbers, I am using a text_field_tag with a observe_field. But the strange thing is that the the search box wouldn't trigger a event unless user pressed enter. I would expected that it would do incremental search, react when user input a new character (num...