My concern is performance, is there a reason to to send the client XML instead of valid HTML? Like most things, I am sure it is application dependent. My specific situation is where there is substantial content being inserted into the web page that has been pulled from a database.
What are the advantages of either approach? Is the size ...
i tried one of the examples here to load the content in the div, but apart from displaying the image, it doesn't show anything. can anyone please point out where i'm going wrong?
ajax1.js:
function General_Refresh(url,div){
//Showing the load image (pay attention to /> of <img
document.getElementById(div).setInnerXHTML('<span id=...
I'm developing a site in javascript and jquery. Sometimes when I refresh I just get different random errors in firebug. What's the deal?
edit: I'm getting errors like a variable isn't defined, when clearly it is and working, and when i refresh again, the error is gone..
using Firefox V3.5.5 Firebug V.1.5.3 and I'm primarily working w...
Greetings,
I have a list of user comments on a page, with a next button which makes an Ajax call to get the second set of comments.
The problem is, the height of the comments div temporarily becomes very small while the loading bar is in place. This makes the user need to scroll back down to see the new comments
The issue can be seen...
I'm writing part of a web page that allows a user to build a table and fill it with information. In the course of building the table, the user will be adding additional columns with headers. I'd like to code it so when the combined width of all the headers causes one of them to wrap that the table columns switch to using vertical text (w...
I am currently using code similar to this:
try {
// IE ONLY
var theElement = "myElementName";
window.frames[theElement].focus();
var selection = window.frames[theElement].document.selection.createRange();
alert ( selection.htmlText );
} catch(e) {
var selection = window.frames[theElement].document.getSelection();
alert ( select...
hi,
i have the following block of code:
$("#contact_container form, #contact_details form").live(
"submit",
function(event) {
$.ajax({
type: this.method,
url: this.action,
data: this.serialize(),
success: function(data) {
data = $(data).find("#content");
...
Hi, I'm working on a project for my A level. It involves finding the maximum flow of a network, and I'm using javascript.
I have a 2D array, with values in the array representing a distance between the two points. An example of the array:
0 2 2 0
0 0 1 2
0 0 0 2
0 0 0 0
I think I need to use a recursive technique to find a path; belo...
Hello,
Can I load javascript code using <link> tag in my website ?
For example I have a javascript file, test.js, which contains the simple code alert('hello');
Can I make the popup window appear using:
<link href="test.js"></link>
Thanks
...
I am trying to redirect a page reading the url from the config file.
However, when I try this:
<script type="text/javascript">
<%string redirectUrl = System.Web.Configuration.WebConfigurationManager.AppSettings["RedirectURL"];%>
window.parent.location.replace("<%=redirectUrl%>");
</script>
the alligator tags <% %> are Not bei...
Hi All,
I have a text box on a form and a calendar extendar is associated with it. When the value changes I am calling a web service with the new date. It seems as tho the textbox change event is being called twice. I have tried to track it down and it appears the even handler is only wired up once and I also tried using jQuery.unbind('c...
Hi,
I want to insert text field values to database using javascript jquery ajax call to C# server method. problem is that ajax call run successfully but C# is not updating the database. what could be the reason. please reply soon.asp code is giving below:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="dbTest.aspx.cs" Inheri...
I tried to make an accordion effect with JavaScript based off this video altering a few things like using an input button instead of a link for the selector. However for some reason it's not working. Firefox error console outputs unkown pseudo-class or pseudo-element "visible" everytime I try to use it. What's the problem?
$("div.exampl...
Hello,
I have an HTML textarea element. I want to prevent a user from entering any HTML tags in this area. How do I detect if a user has entered any HTML a textarea with JavaScript?
Thank you
...
That's it basically. Storing the click coordinates is obviously the simple step, but once I have them if the user comes back and their window is smaller or larger the coordinates are wrong. Am I going about this in the wrong way, should I also store an element id/dom reference or something of that nature.
Also, this script will be run o...
I need to make 3:4 window, where 3 is 75% of screen. How could i set width? Like if i have 100px height and 10000000000000px width monitor, than i shold have 75:100px window.
I heard that it could be done with the help of Javascript.
...
What I have to work with:
An html table 5X7. On many queries, there are less that 35 items filling the complete table.
How can I "hide" the empty cells dynamically in this case, using jQuery (or any other efficient way)?
Thank you.
...
I've been using document.GetElementById succesfully but from some time on I can't make it work again.
Old pages in which I used it still work but things as simple as this:
<html>
<head>
<title>no title</title>
<script type="text/javascript">
document.getElementById("ThisWillBeNull").innerHTML = "Why is this null?";
</script>
</head...
I have the following html:
<html>
<head>
<script>
function myKeyDown()
{
var myDiv = document.getElementById('myDiv');
myDiv.innerHTML = myDiv.innerHTML.replace(/(@[a-z0-9_]+)/gi, '<strong>$1</strong>');
}
function init()
{
document.addEventListener('keydown', myKeyDown, false);
document.designMode = "on";
}
windo...
I really like the Terrain map type for Google Maps.
But instead of the default background be green for the map, how can I make the color yellow?
...