javascript

Please help me with this ajax/javascript/php

Hey guys, I am trying to create a chained list here. I want the user to choose something on the first 4 drop down list and once the last one is chosen, another one is supposed to pop up. I am just testing my code right now and for some reason the my codes are not showing the dropdown list that is supposed to be shown when the last inpu...

Securing third-party JavaScript code

I'm building a system that allows multiple third-party plugins/gadgets conforming to the system's API to be run simultaneously on the page. What is the best practice of securing or isolating these plugins from one another, aside from running them in separate iframes? Should I design the API so that data fields of these plugins are priv...

Javascript question..

What do you usually do with Javascript? I use it to validate form, creating drop down menu and was wondering if you guys use it for other purposes. After all, Jquery is better from my point of view...... ...

Grabbing each frame of an HTML5 canvas

These palette cycle images are breathtaking: http://www.effectgames.com/demos/canvascycle/?sound=0 I'd like to make some (or all) of these into desktop backgrounds. I could use an animated gif version, but I have no idea how to get that from the canvas "animation". Is there anything available yet that can do something along these line...

Accessing a DOM object defined in an external SVG file

SVG standard allows to use and refer external SVG files. I have a file circle.svg that defines a circle object with id "the_circle". From the main SVG file I am able to include this circle and animate it, using SVG linking. I would also like to access the same circle object via javascript, how can I do this ? What is the javascript equ...

Returning Value from HTML window

I have a function that opens a pop up window: function popUp(url) { leftPos = 0 topPos = 0 if (screen) { leftPos = (screen.width / 2) - 150 topPos = (screen.height / 2) - 250 } newWindow=window.open(url,'name','height=300,width=500,left='+leftPos+',top='+topPos); if (window.focus) {newWindow.focus()} when the user closes t...

Difference between onclick() and onClientClick()?

If I use both onclick() and onClientClick() can I make sure that server side will be called only after client side function returns TRUE or vice versa? For example: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <%@ Import Namespace="System.Xml" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHT...

balancing Server side and Client side code on a large website

Let's suppose I am programming Facebook (which i'm not), or some other site that involves heavy traffic. Our general Layout is: All CSS is in external files 99% of JS is in external files the back bone of the websites HTML is generated by a PHP/MySQL backend, then we have JS functions to generate the DOM of parts that commonly change. O...

Javascript: Enabled / Disable radio on selected with javascript

I would like to make this form dynamic with prototype. I mean, the radio should be disabled, but when you chose one, with js, it should turn them enabled, same way if you chose the other one, the 1st should turn disabled. This is my HTML, but I have no idea where to start with JS to make this work, thank you <form id="uploadForm" metho...

jQuery:Something fishy about my URL?

The following URI works in my browser (getting back the intended xml file): http://ipaddress:port/server/gate?Command=GET%26info But when I write the following to work with jQuery, it doesn't. The response is 200 OK but I get a blank XML file. $(document).ready(function() { $.ajax({ type: "GET", url...

asp.net web service and extra qouatation in json result !

Dear friends , I want to call a web service method in javascript. (asp.net 3.5) I have traced the result with firebug . here is the result: {"d":"[{\"TI\":\"www\"},{\"TI\":\"www1\"}]"} I think the correct result should like this {"d":[{\"TI\":\"www\"},{\"TI\":\"www1\"}]} what is the quotation before and after the Bracket ? ...

javascript error in jssh in firefox 4.0b1

Using this javascript through jssh compiled and built for the new firefox 4.0 beta 1 returns an odd message. Here is the code (sorry if it's a little messy) In summary the code checks all frames of a firefox window which is a test page of our unit tests for a element that has an onclick which contains the phrase Goodbye Wonderful, inste...

How to get CKeditor to switch from Hspace and Vspace to proper CSS

I'm working with CKeditor, and for whatever reason, they included Hspace and Vspace in their UI. Convenient idea to allow users to manipulate their images like so, but those are way deprecated. Has anyone converted CKeditor's Hspace and Vspace to CSS, and know how to explain its conversion? I am a javascript novice.. ...

Large amount of Javascript code that does nothing?

I'm trying to make one of my scripts seem really complicated, when it's not. I was wondering if anyone had a snippet of code or something that would help, or a nudge in the right direction? EDIT: I need this because I'm trying to hide an algorithm for something in the middle of the nonsense code. ...

jQuery/JavaScript: Avoid unique ID's for each row in a table?

Hi. I'm not sure if I'm doing this the right way. I have table which I fill with rows that each represent a song in a playlist. Right now, I assign a unique ID per row, and also assign som jQuery.data() to each ID. html += '\ <tr id="track-' + i + '" class="tracks-row"> \ <td class="track"><a id="pla...

ASP.NET MVC - How do I load an image asynchronously?

On the home page of my site I want to display a lot of products which have images which are quite large. Currently the page is taking so long to load that it is actually timing out and the page fails to display! In MVC, or just ASP.NET in general, how can I load an image asynchronously? Basically what I want to do is display the detail...

JavaScript Interference

Here is my <head> + <body> section: <script type="text/javascript" src="http://www.septa.org/site/js/jquery-1.4.2.js"&gt; <script type="text/javascript"> function insert(){ var linkElement = document.getElementById("BackButton"); var linkElementLnk = document.getElementById("BackButtonlnk"); var loc_array = document.location.href.split(...

Automatically scroll down with Jquery?

I have a modal box with a defined height. Inside of this box there is an accordion box that expands when a user clicks a link. The height of the accordion box when it is toggled exceeds the height of the modal box and thus a scrollbar appears. I would like to automatically scroll the bars down to its lowest point to display the new con...

PHP: Problem with varible printing inside javascript

Hi, I have problem with varible printing inside javascript. varible htmlString printing not working: document.write(htmlString) <?php $htmlString= htmlspecialchars(file_get_contents('http://google.com'));?&gt; <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <bod...

Using JS setTimeout to post AJAX requests in a loop, but setTimeout gets called far too often

This question has been answered. The problem was that myEventMoveTrainManaul() was being called from other locations within the code. Thanks to everyone who offered their help. Please forgive me for re-posting this, but it was getting almost no attention and it's very important that I find someone to help me with this. Thank you for you...