ajax

Can I use Ajax and ASP.NET Tracing on the same page?

I'm using an Ajax update panel and have recently added ASP.NET tracing code to aid in debugging. All of the sudden I started getting PageRequestManagerParseErrorExceptions when any Ajax code is executed. For example: Trace.Write("Done setting employeeId."); Apparently this is because I am not allowed to use "server tracing" along w...

showing related data from mysql in ajax

Hello, I have the following code, which works fine: echo '<div id="Result">Content goes here</div>'; echo "<h1>Table: {$table}</h1>"; echo "<table border='1'><tr>"; // printing table headers for($i=0; $i<$fields_num; $i++) { $field = mysql_fetch_field($result); echo "<td>{$field->name}</td>"; } echo "</tr>\n"; // printing table...

How to Pass Variables Into PHP Ajax Handler Script?

Hello, I have a small ajax php application, which outputs data from a mysql db into a table. The rows are links, which when clicked will call an ajax function, which in turn will call another php file, which displays a different query from the same database in a layer without reloading the page. I would like to know how to synchronize ...

Fade Background Color on Update Panel

I have a radajaxpanel that is populated with the selected item from a combobox on another update panel. Currently the radajaxpanel is the same background color as the rest of the page. What I'd like to do, is based on it being populated with data, change it's background color to a muted red. I want it to stand out as an action that ha...

How to parse arrays of objects returned by DWR?

DWR handles lists of primitives quite straight forward. I could not find whether array of objects returned by a DWR method call represent a JSON object. Any clues? Or do I have to return a JSON string representing the array of objects back to the browser? ...

Script to publish my SO Q's and A's on my twitter?

I realized that I'd like to publish my StackOverflow questions and answers on my twitter feed, but I don't want to do it manually. Where would I begin for this? What techniques/technologies/etc are available that would enable this? Perhaps someone has done this, or something similar (posting to blogs, etc?) Ulf's suggestion about my ...

Filling in datagrid columns from database after page is already loaded

I have a web page that loads some data via a SQL query into a datagrid. I was asked to add a new column. During testing I discovered that pulling this extra column of data from the database slows the query down substantially. What used to be a sub-second query now takes about 3-4 seconds. I've checked the database and all the appropriat...

Asp.Net Rating Control

Hi, I can't get the ASP.NET Rating control's selected value(Current Value) in javascript. I am using Rating control in datagrid and do you know how I can get the CurrentValue of ASP.NET Rating in javascript? ...

Displaying different data depending on login status - client side

Hey all, I was just wondering what the best way to do this is and if it could be bypassed. These are my thoughts. I have a bunch of links that when clicked open up a detail panel underneath which displays more information. This is done ajaxy. The thing is however...if the user is not logged in it should take them to the login page and ...

Json or Html? How to tell?

I have a controller that returns either JSON or partial html depending on if the user is logged in. Is there anyway to tell the difference once the result has been returned?? What is the best way. Obviously i have different actions to complete if the response is json or if it is the partial html. With the json one i do a redirect to t...

modifying a php sql query to take an ajax paramter

Hello, I have this code: <?php session_start(); if (isset($_GET["cmd"])) $cmd = $_GET["cmd"]; else die("You should have a 'cmd' parameter in your URL"); $con = mysql_connect("localhost","xxx","xxx"); if(!$con) { die('Connection failed because of' .mysql_error()); } mysql_select_db("ebay",$con); if($cmd=="GetAuctionData") { echo "<t...

Google Maps GeoCoding always uses browser language

I am using the google ajax api loader and want to get all the information in german so I am loading the maps api like this google.load("maps", "2", {language : "de"}); I have tried deu, ger, de, de_DE and even en and ja_JPbut no success. For those who don't understand my problem: http://dl.getdropbox.com/u/5910/Jing/2008-11-24...

How to convert a literal object into user defined object in javascript?

Writing a ton of web applications leveraging JSON/AJAX, I find myself returning tons literal javascript objects (JSON). For example, I may be request all the Cats from GetCats.asp. It would return: [ { 'id': 0, 'name': 'Persian' }, { 'id': 1, 'name': 'Calico' }, { 'id': 2, 'name': 'Tabby' } ] Now, these are all Cat objects wi...

ajax and asp.net tutorials

I am looking for very simple starter tutorials for using ajax in asp.net applications. Are there any on the internet. Thank you for your help. ...

Dynamically updated graphs on a web page - howto?

Hi all, I need to understand a good way to design a web page with dynamically updated graphs. It should be something close to what stock market graphs look like (e.g. Google Finance), although with a bit more complicated functionality, which is not the point. Naturally I am thinking of writing an ajaxy-style flash control, which would c...

SAJAX and Form fields

Is there a way to send a whole form's fields through a sajax function call? I think it is sajax anyway. We are using Mediawiki and the function call is to "sajax_do_call(funcName,[params],callbackFuncName)" I was just wondering if there was a way to jsut drop all fields from a form into params? ...

Cross domain Ajax request from within js file.

Here's the problem: 1.) We have page here... www.blah.com/mypage.html 2.) That page requests a js file www.foo.com like this... <script type="text/javascript" src="http://www.foo.com/jsfile.js" /> 3.) "jsfile.js" uses Prototype to make an Ajax request back to www.foo.com. 4.) The ajax request calls www.foo.com/blah.html. The callba...

Script.aculo.us Sortable onUpdate problem in IE.

I'm working on a project where I am using a script.aculo.us Sortable object. It works nice and fast in Firefox and Chrome, but in IE it is incredibly slow whenever I drop an element. I've done a little checking, and it turns out that in IE, the "onUpdate" callback function gets called about 8 times every time I drop. Normally it is s...

Cascading to a auto completing text box

I have a web page where the user will enter their address. They will select their country and region in cascading drop down lists. I would like to provide an auto completing textbox for their city, but I want to be context sensitive to the country and region selections. I would have just used another cascading drop down list, however the...

How do I run client script after a postback?

I'm looking for something like OnClientClick for a button, but I want it to happen after the postback (instead of before). I'm currently using the following, which works, but it adds the script block over and over again, which is not what I want. I simply want to execute an existing client script function. ScriptManager.RegisterClientSc...