I understand JSON can be used instead of XMLHttpRequest in Javascript, but can I make requests and get totally arbitrary data back?
Like a custom text or binary format?
Or is the interface limited to jSON and XML?
I hope I get through what I wonder here...
a) How do I create a plain request without XML or JSON?
b) How do I access ...
<html>
<body>
<SCRIPT type="text/javascript">
var xmlHttp = new XMLHttpRequest();
var async = true;
xmlHttp.open("GET", "http://www.google.com", async);
if(async)
{
xmlHttp.onreadystatechange = function()
{
if(xmlHttp.readyState == 4)
{
if (xmlHttp.status==200) a...
Hi guys
I have made a hidden DIV containing a flash-movie, and a button which display the layer. When the Flash is finished, I would like it to hide the DIV again.
Flash CS4 AS2.0
I couldn't find any solution on the web that does it. Does any of you know where, or know a solution?
Thank you in advance...
...
I have an HTML select that looks something like this (values are fake)
<select size="40">
<option value="1">What would you do if I sang out of tune,</option>
<option value="2">Would you stand up and walk out on me?</option>
... more
<option value="156">Lend me your ears, and I'll sing you a song,</option>
<option sel...
I am trying to use the jquery "CSV" plugin, as documented here: http://code.google.com/p/js-tables/wiki/CSV
According to the documentation:
// Convert CSV data into array of arrays
jQuery.csv()("1,2,3\n4,5,6\n7,8,9\n"); // = [ [1,2,3], [4,5,6], [7,8,9] ]
But when I attempt to do something similar, it just seems to treat the "\n" as a...
How can I pass a string value by reference in javascript.
I want this kind of functionality.
//Library.js
function TryAppend(strMain,value)
{
strMain=strMain+value;
return true;
}
//pager.aspx
function validate()
{
str="Checking";
TryAppend(str,"TextBox");
alert(str); //expected result ...
I'm trying to parse an mrss feed using jquery but am having some difficulty targeting the child element.
Code:
$(xml).find("item").each(function(){
var $item = $(this);
alert($item.find("media\\:thumbnail").text();
});
MRSS Structure:
<media:thumbnail url="http://somewebsite.com/someimage.jpg" />
UPDATE
The solution $item.f...
Hi,
I have a requirement where a user (while editing the content in a CKeditor instance) can click a preview button to show the page as it would be with all the headers and logo's etc.
The user doesn't like the 'preview' function in CKeditor (which I thought would be adequate), so I was hoping to open the new window and then retrieve t...
Hi,
I noticed a different when calling a function with empty parentheses, or without any parentheses at all.
I am not passing any arguments to the function so I wondered what would be the difference between:
window.onload = initAll();
and
window.onload = initAll;
Please explain the principle behind it.
Thanx in advance.
...
I'm trying something very basic, but I just can't figure out why this won't work.
I can get information on the object using [i] but I can't change data this way?
// Make all the li's invisible
$('div#rotator ul li').css({opacity: 0.0});
// Calculate a random number between 1 and 3
var randnr = Math.floor((1-4)*Math.random()) + 4;
...
I'm looking for a good way to append "..." when I need to gracefully display a string that is too large and doesn't fit in the space that I want.
The way that I'm currently doing that is looking for a max length of characters that will fit in the space, then cut the string to that length and append the "..." . All that in the server-si...
I have a icon with onmouseover event handler.
On mouseover it displays a table.
the Icon is at the right site of the screen.
If the table is small, it will be displayed within visible area. But if the the table is wide enough then only a part of the table is visible. One have to scroll to right to see the rest of the table.
What would ...
Hello,
I'm using jquery's .ajax() method on a button click.
I wanted to know if there a way in whcih I can use the data that I passed in the data-part of the AJAX call in my success() function.
This is my code,
$.ajax({
url: //my URL here..
type: 'POST',
data:{
projDets : projDetailsArray,
},
datatype:'html',
error: ...
Does anyone has any solutions on accomplishing asynchronous cross-domain GET requests. I am looking to make a site that checks available names of other sites. The faster the better.
I'd like it to use my server if possible, as its most likely faster than the client. Would most likely send it a huge array (300-10000) requests.
Examples,...
Simple question here that I can't seem to find an answer for: Once a setTimeout is set, is there any way to see if it's still, well, set?
if (!Timer)
{
Timer = setTimeout(DoThis,60000);
}
From what I can tell, when you clearTimeout, the variable remains at its last value. A console.log I just looked at shows Timer as being '12', n...
When I want to check if an element exists in a page. Are these 2 checks the same? Is there a better more compact way to check the existence. What if I want to check if the value==''. Can this be included in this check as well somehow.
...
Hi, I want to show infowindow with each polygon having their own different contents from excel sheet but my code is showing same infowindow having contents of the last row of excel with all polygons
Please can anyone solve this?
Thanks in advance.
for(m=0; m < array.length; m++)
{
var lat = array[m][1];
var lon = array[m][2];
...
Possible Duplicate:
What are some good ways to prevent people from copying my source code?
Hi,
I am looking into ways to 'encrypt' my HTML and CSS code so that a visitor cannot simply 'View Source' and plagiarize it.
Thanks.
...
I'm getting an unterminated string literal error in Firebug:
Unterminated string literal
$(".search_info").html("<div id=\'sear...arm_bg.png?1279054090\" style=\"displ\n
This error is being rendered from clicking on a Sort By that toggles 'Most Recent'
I have narrowed it down to the 'about_us' text. By removing certain parts of the t...
I'm trying to get my VBA routine to interact with a page that uses JavaScript, and have been successful in the past. After a recent update, it no longer works. At this point I need to either A) programmatically click a button or B) execute the function the button calls. The tricky part is that the button has no declared name. There a...