Results 1 to 2 of 2

Thread: file.name is undefined tmpl.min.js

  1. #1
    Join Date
    Apr 2012
    Posts
    81
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default file.name is undefined tmpl.min.js

    I am getting Error like "file.name is undefined" in my below js in Live website, In my Local server its working perfectly.
    Can anyone help me to resolve it in live ?
    Thanks in advance for any help.

    js File :

    (function (a) {
    "use strict";
    var b = function (a, c) {
    var d = /[^\w\-\.:]/.test(a) ? new Function(b.arg + ",tmpl", "var _e=tmpl.encode" + b.helper + ",_s='" + a.replace(b.regexp, b.func) + "';return _s;") : b.cache[a] = b.cache[a] || b(b.load(a));
    return c ? d(c, b) : function (a) {
    return d(a, b)
    }
    };
    b.cache = {}, b.load = function (a) {
    return document.getElementById(a).innerHTML
    }, b.regexp = /([\s'\\])(?![^%]*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g, b.func = function (a, b, c, d, e, f) {
    if (b) return {
    "\n": "\\n",
    "\r": "\\r",
    "\t": "\\t",
    " ": " "
    }[a] || "\\" + a;
    if (c) return c === "=" ? "'+_e(" + d + ")+'" : "'+(" + d + "||'')+'";
    if (e) return "';";
    if (f) return "_s+='"
    }, b.encReg = /[<>&"'\x00]/g, b.encMap = {
    "<": "&lt;",
    ">": "&gt;",
    "&": "&amp;",
    '"': "&quot;",
    "'": "&#39;"
    }, b.encode = function (a) {
    return String(a || "").replace(b.encReg, function (a) {
    return b.encMap[a] || ""
    })
    }, b.arg = "o", b.helper = ",print=function(s,e){_s+=e&&(s||'')||_e(s);},include=function(s,d){_s+=tmpl(s,d);}", typeof define == "function" && define.amd ? define(function () {
    return b
    }) : a.tmpl = b
    })(this);

  2. #2
    Join Date
    Apr 2012
    Posts
    81
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Got the Solution.
    Its a Script used in Uploading Process.
    In my server i had the problem of permission to uploaded folder.
    I just give 777 permission to my folder and my problem is resolved.!!






    Quote Originally Posted by round View Post
    I am getting Error like "file.name is undefined" in my below js in Live website, In my Local server its working perfectly.
    Can anyone help me to resolve it in live ?
    Thanks in advance for any help.

    js File :

    (function (a) {
    "use strict";
    var b = function (a, c) {
    var d = /[^\w\-\.:]/.test(a) ? new Function(b.arg + ",tmpl", "var _e=tmpl.encode" + b.helper + ",_s='" + a.replace(b.regexp, b.func) + "';return _s;") : b.cache[a] = b.cache[a] || b(b.load(a));
    return c ? d(c, b) : function (a) {
    return d(a, b)
    }
    };
    b.cache = {}, b.load = function (a) {
    return document.getElementById(a).innerHTML
    }, b.regexp = /([\s'\\])(?![^%]*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g, b.func = function (a, b, c, d, e, f) {
    if (b) return {
    "\n": "\\n",
    "\r": "\\r",
    "\t": "\\t",
    " ": " "
    }[a] || "\\" + a;
    if (c) return c === "=" ? "'+_e(" + d + ")+'" : "'+(" + d + "||'')+'";
    if (e) return "';";
    if (f) return "_s+='"
    }, b.encReg = /[<>&"'\x00]/g, b.encMap = {
    "<": "&lt;",
    ">": "&gt;",
    "&": "&amp;",
    '"': "&quot;",
    "'": "'"
    }, b.encode = function (a) {
    return String(a || "").replace(b.encReg, function (a) {
    return b.encMap[a] || ""
    })
    }, b.arg = "o", b.helper = ",print=function(s,e){_s+=e&&(s||'')||_e(s);},include=function(s,d){_s+=tmpl(s,d);}", typeof define == "function" && define.amd ? define(function () {
    return b
    }) : a.tmpl = b
    })(this);

Similar Threads

  1. Replies: 5
    Last Post: 09-28-2012, 01:31 AM
  2. $f is undefined
    By creative creator in forum JavaScript
    Replies: 2
    Last Post: 06-18-2010, 01:25 PM
  3. undefined logout
    By tech_support in forum The lounge
    Replies: 5
    Last Post: 12-31-2007, 09:04 AM
  4. Undefined Offset?
    By alexjewell in forum PHP
    Replies: 3
    Last Post: 10-17-2007, 06:12 PM
  5. rsspausescroller is undefined
    By wiser in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 11-26-2006, 07:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •