Skip to content
Archive of posts tagged AJAX

Dynamically Adding JavaScript To Your ASP.NET Master Page From A Child Page

A common challenge when working with ASP.NET master pages is how to dynamically add JavaScript that is relevant to a specific child page.
In other words, maybe your site has 10 child pages that share one master page / template. One of them is, let’s say, a contact us / directions page, and on that page, [...]

Ensuring JavaScript Is Enabled Before Displaying Content On A Web Page

I’ve previously noted that password-protection schemes that depend on JavaScript alone are entirely pointless. No matter how hard you try to obfuscate, mask or hide efforts to protect JavaScript code, anyone with a bit of knowledge and a bit of time on his hands can retrieve and view all your code, including all your username [...]

Fixing An “Unterminated String Literal” Error In An AJAX JavaScript HttpRequest

So you’ve written your first AJAX program, tested it, and it seems to work. Except sometimes, when your “helper script” is supposed to return some data from your database, you get this error:
Unterminated string literal
What gives? Basically, you’ve run into a quote mark in your data — and because it doesn’t know any better, JavaScript [...]

A Charity Donation Recognition System Using PHP, MySQL, JavaScript And DOM

Recently asked on Yahoo! Answers:

Divide photo in 5,000 pieces with rollover text?
we are raising money and selling support tickets. To show our progress we are going to start with a black and white image split in 5,000 pieces then as each piece is sold we want to turn it into color.
When you roll over each [...]

Printing Sections Of A Web Page Using DIVs And JavaScript Remote Scripting

Recently asked on Yahoo! Answers:
Is there an equivalent of “window.print()” in JavaScript for printing individual elements out of a whole page?
For example:
Whole page: window.print
Individual Element: document.getElementById(‘element’).print…
I don’t want to print a whole page, just an individual element.
This really intrigued me because it’s the first time I’ve had cause to use remote scripting with JavaScript. We’re [...]

Getting Plain Text From An ASP.NET 2.0 Page For Use As An AJAX Data Source

In a follow-up comment to my answer on his AJAX question on Yahoo! Answers, mzanime2000 posed a problem faced by many ASP.NET programming beginners: how to get ASP.NET to return plain text only for use in AJAX.

Wow thanks! Pretty nice well-detailed response. Now I just hope I can get it to work with ASP.NET, I [...]