I am retrieving JSON using jQuery's getJSON call.
My problem is that some of the fields in the returned JSON have spaces in them.
How do I retrieve these values from the JSON without changing the source data? See line marked "ERROR" below:
$.getJSON(url, null, function(objData) {
$.each(objData.data, function(i, item) {
var zip ...
Here is what I'm looking to do.
1: Have a jQuery WYSIWYG editor that allows users to enter text
2: Have a box that displays extracted text from the WYSIWYG editor that is only viewable. The extracted text should be bulleted. Each bullet item should be anything that is contained in an tag in the WYSIWYG.
Example:
WYSIWYG editor would ...
Say I have a third party twitter widget on a page which keeps updating whenever there is a new tweet. Is there some way to figure out when a new div has been added to this widget? Is there an event or something I can hook onto (on maybe the widgets parent div)?
If there isn't, how do I do this? Maybe hook onto the ajax calls the widget...
How to make HTML IFrames talk to each other? So I have 2 Iframes I know and create thare contents. I need to make tham talk one to other - for example one to send XML data to other or just call JS function from it.
...
Hi ,i am new to Javascript.
<html>
<body>
<script type="text/javascript">
var x=5;
document.write(x);
document.write("<br />");
var x
document.write(x);
</script>
</body>
</html>
Result is :
5
5
so when the second time when its declared x should be
undefined but it takes the previous value of x.please explain this?.Wh...
<script type="text/javascript">
var num=2;
function addElement()
{
var ni = document.getElementById('myDiv');
var newdiv = document.createElement('div');
var divIdName = 'my'+num+'Div';
newdiv.setAttribute('id',divIdName);
newdiv.innerHTML = 'Subject-' + num + '* :<input type="text" id...
I'm new to JavaScript, and working on a hobby project with a few developers. We have a simple page that is used to submit requests to a database.
I decided to try learning JQuery, and started implementing some AJAX functionality into this request page. It works fine in FireFox, IE and Safari, but for some odd reason, I can't get it to w...
Im uploading a file using the following jquery..
function ajaxFileUpload(jobid)
{
$("#loading")
.ajaxStart(function(){
$(this).show();
})
.ajaxComplete(function(){
$(this).hide();
});
$.ajaxFileUpload
(
{
url:'addjobrpc.php',
secureuri:false,
jobID:jobid,
fileElementId:'fileToUpload',
dataType: '...
What's the best way to send data from client to server?
The example code I'm using is from http://stackoverflow.com/questions/333664/simple-long-polling-example-code
...
I am working in an enterprise CMS (Autonomy/Interwoven Teamsite) that does not give me direct access to the head of a page. I can only link style sheets and add external js files. Normally I would add a conditional comment to link an ie6/ie7 stylesheet. In some searching I've found a way to target ie with conditional commenting inside j...
eval('({"suc":true})')
The above is wrong,should be:
eval('{"suc":true}')
Why?
...
hello all,
I want to insert the values in database in my MVC application but I am getting the values through javascript.Please tell me how shall I do ,is there any way through which we can handle javascript in mvc application.Please suggest some useful resources.
my code of javascript is regarding the dynamic fields creation through wh...
I'm having an interesting but difficult problem with my JavaScript code. Basically, I'm trying to create an animation of a simple algorithm using JavaScript (a sorting algorithm, if you're wondering) for educational reasons. I've already got all of the animation code written (using RaphaelJS), and it all works fine. The trouble is gettin...
here's my code with jquery:
function check_hotel_exists(value, col)
{
var url = base_url + 'ajax/checkuniquehotel';
var response = false;
$.get(url, {hotelname:value}, function(data){
if (data === 'true') response = true;
});
alert((response) ? 'Hotel is Not Existing' : 'Hotel Exist...
This is the exact case: How to disable the italic button in TinyMCE's toolbar, when user has selected h1-style from the Styles-dropdown?
...
I would like a jQuery function to know which link was clicked to call it, i.e. I would like the link's id value to be passed to the jQuery function.
Is this possible? If so what is the neatest way to do it.
...
Hi,
I've got this code:
<html>
<head>
<link type="text/css" href="css/blitzer/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript">
$(function() {
$...
Hai Guys,
I want to set cursor at a position of length 14 on a textbox which will not have a value.. Iknow initially cursor will be at 0 i want it to be at 14
...
Can I create a piece of code for my website which focuses the browser url bar (field) so I can directly start typing in a new url?
There could be for example a predefined hotkey which would execute this code.
Background: My (mouse-less) webapp steals the focus when loaded, so keyboard shortcuts can work. Users requested a possibility t...
How can I Open and Close Popup windows without Javascript in ASP.NET?
...