I have the following code to display JSON results from an AJAX request as an unordered list. It works well enough in Safari but on Mobile Safari on the iPhone the raw data displays but the UL does not. In fact the for loop isn't triggered.
$("#results").append(data);
var songdata = JSON.parse(data);
var i = 0;
for (i=0;i<=songdata.to...
I am using javascript (using jquery) to pass a # symbol as a GET parameter via AJAX call.
The problem right now is that the # symbol is breaking up my querystring.
Any help appreciated. Thanks!
...
The following Javascript displays in Safari but not Mobile Safari. Can anyone see any bugs?
$("#results").append(data);
var songdata = JSON.parse(data);
var i = 0;
for (i=0;i<=songdata.total;i++)
{
alert(i);
var songhtml = "<ul><li><img src=\"" + songdata.data[i].artwork + "\" /></li><li>" + songdata.data[i].title + "</li><li...
I have a custom component that extends a panel. The panel has a top tool bar with a basic config. I want to be able to add items to the panel dynamically after it has been created.
Those items should always come at the end of the main set of menu items and before the filler that pushes the logout button to the far right, so I wrote the ...
I am using jquery to the server code returns the following values
0:SELECT ONE;1:VALUE1;2:VALUE2 etc
how do i populate this into a select box?
var="0:SELECT ONE;1:VALUE1;2:VALUE2";
$("#targetSelectBox"). ???????
...
I would like to publish streams on an external Facebook Connect website.
This should be done via the JavaScript client library which I've already included.
The code of my page is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1...
i want to to scroll up and down a page with javascript smoothly. i have follow some code on this page-
http://www.xfunda.com/index.php?view=article&id=55%3Ajavascript-page-scroll-scroll-a-web-page-from-bottom-to-top-smoothly&option=com_content&Itemid=75
but this only goes up, im quite confused on hot to get to specific div...
Anyone knows if there is any benchmark done to browsers in a "google maps" test suite?
Google Maps with lots of markers and data can really get slow so maybe this was an interesting "real world" benchmark that stresses javascript / DOM management in browsers :)
...
I have a script running on xampp and when I run this script with alert call in it the file executes but when I run it without alerts it just sits there and doesnt return anything. What am I doing wrong?
Code:
var xhr;
function getPlants(xhr){
try {
xhr=new XMLHttpRequest();
}catch(microsoft){
...
Hello I am intergrating the easyslider plugin into my website, I was hoping somebody will have come across my problem, I am using the paginate version of it so I can navigate in the slideshow to any image, however using the paginator then pauses the slideshow, does any one know how I can stop it from pausing and just carry one from the s...
http://www.modernizr.com/docs/#borderradius only 8KB in size.
...
this code works fine in FF, not in IE.
var target = $("#targetSelectBox")
var vals = values.split(";");
for (var i = 0; i < vals.length; i++) {
var parts = vals[i].split(":");
target.append($('<option />').val(parts[0].trim()).text(parts[1].trim()));
}
...
I've seen it recommended to reference jQuery via:
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">
</script>
The idea being most people already have a cached copy on their client.
What if a hacker replaces that file on google's server? They could do an infinite number of "e...
Hello,
I'm playing with ways to allow users to insert embedded objects safely into content. What I'm doing now is essentially the following:
1) parser for youtube embed code
2) get video id, remove all other embed code
3) rebuild youtube embed code with video id
This seems to work pretty well, and should be safe. Problem, I'd essent...
I have a html page with a basic tab control. I use javascript to show and hide tabs and tab content divs. My problem is that if I change the visibility of an element inside one of the tab content divs to 'hidden', then back to 'visible', the element seems to forget or lose its parent div container and remains visible, regardless of its o...
All right, I need to do two things:
I need to determine the equation of
a line, with the angle given, from a
point in 3D space
I need to determine the equation of
a plane that is perpendicular to
that line, and is a set size, with
the original line in it's center.
I will need the plane's equation to be in a form where, given a new li...
I'm using the UpdateProgress control in ASP.NET. My question is simply how do I improve it's responsiveness? It doesn't consistently show up if at all. I would use JQuery to simulate the effect but I'm trying to avoid introducing tons of javascript because it's a webforms application. Thanks for your help!
...
I'm attempting to use attribute selectors and CSS for formatting elements.
The HTML looks like:
<div id="user" highlight="false">User Name</div>
The CSS is:
[highlight=true]
{
background-color: red;
}
[highlight=false]
{
background-color: white;
}
And then there's some accompanying JavaScript:
if( foo )
{
node.setAtt...
Using document.GetElementById(thingieID) doesn't seem to work.
Can anyone help this DOM newbie?
...
I am using jQuery.ajax(...) to retrieve JSON data from an ASP.NET MVC service. When the server encounters an exception, I send a 400 Bad Request status back to the client and send my exception as a JsonResult:
Response.StatusCode = 400;
return Json(new { ex.Message, ex.StackTrace });
And here's my jQuery code:
$.ajax(
{
type: "PO...