Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-30-2012, 06:27 PM   PM User | #1
Disco_Cowboy
New Coder

 
Join Date: Jan 2011
Posts: 14
Thanks: 3
Thanked 0 Times in 0 Posts
Disco_Cowboy is an unknown quantity at this point
Dojo syntax issue

I am new to Dojo and tyrign out some code below. I am getting a syntax issue on line 9:

"a"{

Full code:
Code:
//Auto Download Tracking
/*Regex list of download file extensions, pipe and backslash delimited. Looks for the period before the file type so it will work on download links with query parameters after it */
var downloadTypes = /\.pdf|\.doc|\.xls|\.zip|\.csv|\.ppt|\.rtf|\.pptx|\.docx|\.xlsx|\.wmv|\.mpg|\.mov|\.avi|\.exe|\.mp3|\.wma|\.txt|\.rar|\.wav/i; 

/*Regex list of on-site domains, pipe and backslash delimited. */
var onsiteDomains = /bluecrossma\.|ahealthyme\.|livinghealthybabies\.|paramisalud\.|whygetit\.|indigo-insurance\.|healthy-actions\.|javascript|#/i;

dojo.behavior.add({
	"a"{
		onclick:function(dom){
			if( dom.href.match(downloadTypes) )
			ntptEventTag('ev=download&eventPage=Download From: ' + escape( wa.currentDomain + wa.currentURL ) + '&downloadFile=' + escape( dom )); 
			
			if(!dom.href.match(onsiteDomains) )
			ntptEventTag('lk=1&ev=Exit Link&eventPage=Exited From: ' + escape( wa.currentDomain + wa.currentURL ) + '&exitTo=' + escape(dom)); 
		};
	}
});
dojo.behavior.apply();
Is there a simple fix for this?

Thanks!
Disco_Cowboy is offline   Reply With Quote
Old 08-30-2012, 09:10 PM   PM User | #2
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
I think you are missing a colon:

"a" : {
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:28 PM.


Advertisement
Log in to turn off these ads.