1-866-277-9958

ajax

Error "Access to restricted URI denied" when making AJAX cal

Solution: 

jQuery as of version 1.2 has a new dataType setting that works around this problem. It can only be used with the .ajax function, not .get or .post.

Example syntax

	$.ajax({
		type: 'GET',
		url: stats_counter_url,
		data: { 'action':'impression', 'venueid':venueid, 'pn':pn, 'filter':filter, 'ads':ads},
		dataType: 'json',
		jsonp:'jsonp_callback',
		success: function(data) {
			alert(data);
		},
	});

Client side scripting

Client-side scripting describes programming that is added into a web page to interact with page and browser objects. It differs from server-side scripting because it is executed on each user's computer instead of on the originating web server. JavaScript is the most common scripting language; VBScript is also used but only works on Windows browsers. Client-side scripting is becoming a sophisticated arena paving the way for advanced functionality.

Safari-Like Search Inputs

By default search inputs are notoriously ugly. Just look at what they are: a plain text input. But Apple had the great idea to make a search widget for Safari that looks like this:

Safari Search Input

This is probably nothing new, it's been around for quite a while, but the code used to create the field (input type "search" instead of "text") does not validate and only works in Safari. So what happens when you like the search field and what to use it on other browsers?


Get Drupal help when you need it most! Find hundreds of great tutorials. Track, rate, comment and more. Create Account
Syndicate content
Syndicate content

©1999 - 2011 LevelTen Interactive - Dallas, TX