I am currently trying to use AJAX in my application via jRails. I am trying to return a JSON object from my controller, and then parse it in my Javascript. I am using json2.js to do the parsing.
Here is the code I currently have:
function getSomething()
{
$.ajax({
type: "GET",
url: "map/testjson",
success: ...
i have created login page which sends ajax request to a php page for login verification.
On that php page i m creating session, and sending response as per login verification.
if user is authenticated i m redirecting it to home page from java script from where i send ajax. but on that homepage i cant get that session object... why? can u...
how can I write and read files in JavaScript?
Is it possible?
...
//I am cloning a dom element and inserting it in dom element multiple times
<div class='toBeCloned'>some text</div>
<div id='target'></div>
var _clone=$('.toBeCloned').clone(true);//create clone
var _target=$('#target'); //this is target
_target.append(_clone); //append target
_target.append(_clone); //append t...
Hello, is it possible to apply 2 font filters that are of the same type but with different parameters in SIFR?
I want to get an outline effect around my fonts and tried to apply 2 glow filters with different settings to get the desirable look, but it looks like only 1 filter (last in the list of filters) is applied. Does anyone know if ...
Are there any good reasons for why you would include JavaScript like this:
<script type="text/javascript">document.writeln('<script src="http://example.com/javascript/MyJavaScript.js" type="text/javascript"><' + '/script>');</script>
(Sorry for the long scrolling line. This is in the head of a HTML document.)
I've been looking at som...
To create a digital signature with the client certificate in javascript, there was a function: crypto.signtext() that doesn't work anymore
What is the easiest way to do this now?
...
Hi,
All i want is to pass a HTML (DOM object) from javascript to Actionscript.
i saw this article on the net and tried a similar code.
But when i execute the code in IE, it alerts : "Out of memory at line 18". I'm stuck here from yesterday.
i'll post the mxml and html here..
The MXML :
<?xml version="1.0" encoding="utf-8"?>
<mx:...
Hi,
How to prevent the new line character at the beginning of the text entering in a multiline text box? Now, I already trimmed the white space at the beginning of the text. but i can't prevent the new line character that has to be occurred by entering the enter key on the most beginning of the text box. Please help me. thanks in advanc...
I have a javascript that does this (http is your XMLHttpRequest object)
var r = http.responseXML.getElementsByTagName('item');
The issue is variable r is always an empty list if the response contains non-English character (r.length is 0).
The response header is correctly set
Content-Type: text/xml;charset=ISO-8859-1
This is what the...
Say I have an image with a couple of dots in a web page. When someone clicks on the dots I want a JavaScript function to be executed and then a div placed over the clicked dot in the image. Something akin to markers in maps. How do I go about doing this?
...
Hi Guys,
I have the fllowing requirement,
I have a model called Task to display user tasks
1 . Link to add a new task (in the tasks index page)
2 . when a user click the link, 'tasks/new' action will open up inside a popup
3 . when the user save the new task, I want to close 'new task' popup and refresh the
parent page 'tasks/index...
I'm playing some notes at regular intervals. Each one is delayed by a random number of milliseconds, creating a jarring irregular effect. How do I fix it?
Note: I'm OK with some latency, just as long as it's consistent.
Answers of the type "implement your own small SoundManager2 replacement, optimized for timing-sensitive playback" are...
I'm writing HTML code for a java servlet. i first write the code in html/js so i can debug what im working on, and then ill make it a java string and put it in my servlet. My problem is that the code is working fine when i view it in ff from a local html file, but when i view it on my java servlet, it doesnt work because the js isnt ge...
Hi,
I'm a beginner of ASP. I'm maintaining at ASP 1.0 page and I want to reload the page with an additional parameter when user click client-side URL. Its important that it also keeps the current parameters.
The objective is to export the table currently display in Excel. So I want to reload the page with a special parameter that w...
I want to have a confirm box when user tries to close the window.
window.onbeforeunload = function (evt) {
var message = 'Are you sure you want to leave, cause there are some unsaved changes?';
if (typeof evt == 'undefined') {
evt = window.event;
}
if (evt ) {
evt.returnValue = message;
}
return message;
}
The thing is i wa...
Hello,
I am trying to make a chatroom layout like the following:
Now my problem is that I am not sure how to have the container box occupy the whole width and height (with valid doctype) and then make the center div grow if the window grows keeping the rest constant.
i am well aware of js/css. so i just need some beginning guideline...
Dear Masters!
I have little snippet for validatin' my form. I need help to position the error messages, because now all message appear in the filed, so the user can't see it, and so its very annoying.
$(document).ready(function() {
jQuery.validator.addMethod("lettersonly", function(value, element) {
return this.optional(element...
i do this that can drawing when click:
polyline.enableDrawing();
and my program is :
how can i unable it(when i click a div element)
thanks
...
i think it has two ways :
1.right click and select the 'delete me'
2.has any other way ???
so how does enable the right-click on google-maps,and then delete the marker.
thanks
GEvent.addListener(marker, 'mousedown', function(e) {
alert(e)
if (e.button == 2){
alert('sss')
map.removeOverlay(marker);
}
and whe...