I'm using the JQuery .ajax method to get the results of a simple PHP query in XML (which I've done various times within this project without a problem). However, the XML result that I receive from within my main project is different to what I expect (as tested by simply viewing the PHP file) when viewing the results in Firebug's console...
Hi All,
If, as here at work, we have test, staging and production environments, such as:
http://test.my-happy-work.com
http://staging.my-happy-work.com
http://www.my-happy-work.com
I am writing some javascript that will redirect the browser to a url such as:
http://[environment].my-happy-work.com/my-happy-video
I need to be able t...
I have this code to show a map using the Virtual Earth API:
<script type="text/javascript">
function GetMap() {
var map = map = new VEMap('myMap');
map.LoadMap(new VELatLong(47.6, -122.33), 10, 'h', false);
}
$(document).ready(function() {
GetMap();
});
</script>
<a href="#" onclick="$('#myMap').togg...
I'm editing some existing html where the javascript loads a another page inside an iframe. In the page is an html form. When I hit submit, I'd like for the outer page to stay and the iframe to change to the results page. However, right now the whole page changes to the results page for the form. I'm guessing there's a way to solve this j...
Which is faster,
Using an XMLHTTP Get request and than using eval() for the reponsetext
Using the JSONP technique for loading a script and then evaling the innerHtml of the script.
Dynamically adding a script tag to the head of a document where the javascript object is being assigned to a variable?
My gut tells me this should be opt...
I understand that cross site scripting (xss) is not good and is not supported in most browsers. However, I am building a page to be used only by about 3 or 4 people within my company. On this page I have a frame from another domain and I need the parent page to be able to access the values within that frame.
So my question is, is ther...
Hello everyone.
Im programming my first application in Adobe AIR but i've noticed that on the install dialog it says my program has unrestricted access to the filesystem and such and i think that might scare potential users.
Is there any way i can restrict it so that message doesnt show up in the dialog?
Thanks.
...
I have a bunch of DIVs that contain textual information. They're all the same width (maybe 400px or so), but different heights. For space reasons, I'd like to have two or three columns of these DIVs (sort of like a want-ad section in a newspaper). See attractive ascii-art below :)
DIV1 DIV3
DIV1 DIV3
DIV1
DIV1 DIV4...
I've got a textarea, and when it changes, I'd like a function to be called.
However, the standard onchange event fires after the focus leaves the textarea. What I really want is for the even to fire as soon as the user begins typing.
I could bind onkeypress, but that doesn't handle, say, pasting text into the textarea with the mouse. P...
First, here is what I would like to do:
Row 1
Row 2
Row 3
I have code setup so that when I hover over row1, 2 or 3, the row gets highlighted. This is done via css.
I would like to be able to (for instance) click row1 and then it would look like this:
Row 1
Some text here
Row 2
Row 3
That text would stay there until I clicked on...
I'm stumped, I can't seem to get this simple Javascript function to get called.
Thanks!
<html>
<head>
<script type="text/javascript">
function increase()
{
alert(" the button was pressed");
}
</script>
</head>
<body>
<form action="Test.html" method="post">
<input type="submit" onclick="increa...
For some performance reasons, I am trying to find a way to select only sibling nodes of the selected node. For example,
<div id="outer">
<div id="inner1"> </div>
<div id="inner2"> </div>
<div id="inner3"> </div>
<div id="inner4"> </div>
</div>
If I selected inner1 node, is there a way for me to access its sib...
We have a requirement that has had me skimming the web for quite sometime now. Here is the problem scenario. We have a web-page and the page here contains three drop-downs as shown in the picture below (Dummy fields - but the actual business data is also on the same lines)
Here, we have three drop downs with the data being populated dyn...
What is the better way to add a reference to a javascript file from another javascript file?
Supose that I have one js file included in my webpage. This javascript has a dependency to another file. So I want to reference the dependency within the original js file, and not from the html code. Is my thought correct?
I know I can create a...
I have an app written in XUL which contains a custom tree view that has many items. I've got a button that allows the selected item to be removed but my problem is that whenever this button is pressed, the tree gets scrolled all the way to the top. I have tried to fix this by re-selecting the item at the old index, but unfortunately this...
Is it possible to rotate a Div in cyclic rotation using javascript. I have four DIVs in an HTML page. I need to rotate those DIVs in a cyclic rotation.
If it's possible tell me now. It is urgent.
Thanks & Regards
Ravi Kumar
...
Loading javascript in iframe like gmail loading javascript in hidden iframe(js_frame)
and make it context sensitive.
...
I have a site that lists several upcoming events, and each event has a comment button to leave comments. It looks like this (it's in swedish, but I think you can figure out the structure):
The div containing the textarea for writing the comment is initially hidden, and when clicking the 'comment'-icon it is displayed using the followi...
for example:
var str="<br>hi<br>hi";
to replace the last(second) <br>,
to change into "<br>hihi"
I tried:
str.replace(/<br>(.*?)$/,\1);
but it's wrong. What's the right version?
...
Hi, I was wondering whenever exists a solution to perform synchronization in JavaScript code. For example I have the following case: I'm trying to cache some response values from AJAX call, the problem is, that it's possible to perform simultaneously several calls, therefore it leads to race condition in the code. So I'm very curious to ...