Snytax Error


hi, newbie when comes lastest forms of code (did learn html 10 years ago).

 

any ways getting error message in dreamweaver cs5 reads "there syntax error on line 45. code hinting may not work untill fix error".

 

now when open page online linked .js file , "inspect element" couple of error messages... , 1 being

"syntaxerror: missing ; before statement @ http://premium-posts.com/js/tweet/jquery.tweet.js:45"

 

so not know exctly , problem is.. think. went .js file , placed ; @ begining of code on line 45... still comes error??

 

here code in question , line 45 in bold.

 

$.fn.extend({

      linkurl: function() {

        var returning = [];

        // see http://daringfireball.net/2010/07/improved_regex_for_matching_urls

        var regexp = /\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\ s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!() \[\]{};:'".,<>?«»“”‘’]))/gi;

        this.each(function() {

          returning.push(this.replace(regexp,

                                      function(match) {

                                        var url = (/^[a-z]+:/i).test(match) ? match : "http://"+match;

                                        return "<a href=""+url+"/">"+match+"</a>";

                                      }));

        });

        return $(returning);

      },

      linkuser: function() {

        var returning = [];

        var regexp = /[\@]+([a-za-z0-9-_]+)/gi;

        this.each(function() {

          returning.push(this.replace(regexp,"<a href=\"http://"+s.twitter_url+"/$1\">@$1</a>"));        });

        return $(returning);

      },

   

also, 1 other error  i'm getting "inspect element" , says

"typeerror: $(...).tweet not function @ http://premium-posts.com/js/custom.js:43"

here code page

 

//##########################################

// tweet feed

//##########################################

 

$("#tweets").tweet({

        count: 3,

        username: "ansimuz"

    });

 

when click on link the page in question typeerror line above, opens line       username: "ansimuz" highlighted... i'm assuming issue. once again, have no idea correct this.

 

 

i don't know enough rules of javascript code identify problem, if out there can me learn little... appreciated , if 1 can point resource may able consult , learn from, appreciated.

return "<a href='" + url + "'>" + match + "</a>"; 

 

as second error, have have jquery tweet script correctly set use tweet() function. placed jquery.tweet.js after custom.js in <head> - should other way around.

 

--

kenneth kawamoto

http://www.materiaprima.co.uk/



More discussions in Dreamweaver support forum


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account