Hi, I have one web application, in this i have to validate one date field of format like mm/dd/yyyy. I searched in the net but i didn't get the proper one. Please help me by providing the new function or by correcting on my code. My code is shown below.. I had called this JS function at onblur event..
function isValidDate() {
var re = ...
I'we got a Json response from a ArcGIS server that look like this:
{ "displayFieldName" : "ELTTYPE",
"features" : [
{
"attributes" : {
"ELTTYPE" : "Faldunderlag",
"DATANR" : 721301,
"ELEMENTNR" : 40,
"AREALTYPE" : "BELÆGNING",
"SHAPE.area" : 26.4595572
}
},
{
"attributes" : {
"ELTTYPE" : "Prydplæne",...
My site is loading up perfectly in Firefox, Chrome and other browsers like Safari (albeit a bit slow). Link: http://www.dafactopedia.com
It was even working with IE till yesterday but after I compressed my JavaScript code with closure compiler it doesn’t seem to load fully. If I disable JavaScript in IE it opens up but not perfectly. I ...
Using .NET, mootools/JavaScript.
I want to create a trophy mechanism similar to SO's badges.
So when a user recieves a trophy, a small fading DIV will appear at the top of his page.
Problem is, I need to keep checking against my DB if the user recieved a new trophy or not.
How would you approach it?
Would love to get code samples if yo...
I am creating a dynamic table in which each row has a group of radio buttons placed in different columns.
I want to change the cell background color when a radio button is clicked.I am constructing the table using the code snippet below. How to identify the radio button in javascript, so that I can set the cell with an appropriate backgr...
I have a div as a container for a file view. This div has scrolling in y direction.
I want to automatically scroll the content inside this container div to a specific position when loading the page, but without to scroll the whole page. I have tried with <a name="scrollHere"> and location.hash = 'scrollHere'; but this scrolls the whole ...
Hi,
Does javascript regular expressions support backreferences inside character class?
I want to do something like this:
htmlString.replace(/attribute_name=(['"])[^\1]*\1/,'')
But that does not work. This does:
htmlString.replace(/attribute_name=(['"])[^'"]*\1/,'')
Unfortunatelly my attribute_name can contain apostrophes or quote...
Hi,
I would like to load the content of an iframe with JavaScript. I don't want to change the src but directly the content with:
document.getElementById('frame').contentDocument.body.innerHTML = data;
It works but the JavaScript in data is not executed. Is it a security protection or I forgot something?
...
Hi!
Is there any way to detect if the mouse wheel is scrolling sideways in Javascript? I am now using the excellent jquery.mousewheel.3.0.2 plugin, but I couldn't find any relevant parameters on the event. Please help!
...
I am developing a plug-in for CKEditor that needs to make some changes to the editor's content immediately before saving. In FCKeditor, I achieved this using the OnAfterLinkedFieldUpdate event but I haven't yet been able to find an equivalent way of doing this in CKEditor. I had hoped there would be a suitable event to hook into but ther...
Is there an easy way to submit all input elements on a page?
I have a very customisable page where the user can add and remove rows from multiple tables. The rows contain various different input elements. Do I have to put each table inside a form and then on submit have javascript to submit all the forms?
...
I am parsing an xml file after a ajax call to 'get' the xml file. I am trying to return one of the nodes (using the find method). however it will not return the value in ie - fine in firefox. i am doing a alert to test the value and it just comes back blank. Below is the code:
function autoFeedGetter () {
$('#notifyBox').empty();
$.a...
Hello,
Now i have a select box.
<select multiple size="5" name="interest">
<optgroup label="Sports">
<option value="">Footaball</option>
<option value="">Basketball</option>
<option value="">Volleyball</option>
</optgroup>
<optgroup label="Music">
<option value="">Folk Musique</option>
<option value="">Pop Musique</option...
Hi all,
I have a repeating table where the name of the elements would be (e.g. 'tdName_1' 'tdName_2'), and I was wondering if it would be possible to getElementsByName('tdName_').
PS: I can not use Jquery.
Thanks In advance.
Cesar.
...
Make this syntax possible:
var a = add(2)(3); //5
I got this question at
http://dmitry.baranovskiy.com/post/31797647
Got no clue. Confused.... Know the answer...
...
I have this code
function check(){
$.get("friend.php", { id: friendid }, function(data){
//Do stuff with 'data' variable
});
setTimeout(check,5000);
}
It checks friend.php every 5 seconds and returns the result to the data variable.
What I'm trying to do works just fine in other browsers, but in IE8, after the first time it chec...
Hi guys,
I have this bit of code which I am not sure if it is possible what I need to do, if you check the input type 'hidden', you will see this (id="'inpTdId'+ tdIndex" value="tdRegularMedicine_+ inpTdId") as I need to get the input hidden to store a new value and id for each time the loop goes through.
I am trying to generate a new ...
I have a Spring MVC web application that is generating a report on the server, once the report is generated, I need to enable a button that allows the user to download it. I am not sure how to go about doing this.
I figured that I will have to spawn off a thread that will just keep checking for the existence of the file and use javascr...
I have put some xml-fragments in a div and retrieve it with getElementsByTagName. It works fine in Firefox but Internet Explorer ain't so nice... What should I do to fix this?
var thumbnails = content.getElementsByTagName("thumbnails");
for (var i = 0; i < thumbnails.length; i++) {
thumbnails[i].innerHTML
...
In firefox Fancybox only works on the last image (last image in the source, not the visual webpage).
In IE everything works fine.
I changed ID into CLASS, but no succes yet.
You can find the source here:
http://www.luukratief-design.nl/dump/parallax/stack.html
please help! Bugging me for hours now.
...