Click here to Skip to main content
15,892,797 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: javascript Pin
Vasudevan Deepak Kumar21-Mar-12 9:52
Vasudevan Deepak Kumar21-Mar-12 9:52 
Questionget the bytes of input type="file" Pin
ThetaClear14-Mar-12 5:26
ThetaClear14-Mar-12 5:26 
AnswerRe: get the bytes of input type="file" Pin
Graham Breach14-Mar-12 9:16
Graham Breach14-Mar-12 9:16 
GeneralRe: get the bytes of input type="file" Pin
ThetaClear14-Mar-12 20:12
ThetaClear14-Mar-12 20:12 
QuestionIssues when using .Live Pin
nitin_ion13-Mar-12 18:19
nitin_ion13-Mar-12 18:19 
QuestionEvent: JavaOne and Oracle Develop 2-12 Pin
alphauser612-Mar-12 4:03
alphauser612-Mar-12 4:03 
AnswerRe: Event: JavaOne and Oracle Develop 2-12 Pin
Richard MacCutchan12-Mar-12 4:34
mveRichard MacCutchan12-Mar-12 4:34 
QuestionFunction.name property missing on IIS/Jscript Pin
captnmac9-Mar-12 7:12
captnmac9-Mar-12 7:12 
I'm working on a project using Jscript on Microsoft IIS.
I already wrote a bunch of emulation functions to make the framework more compatible with modern ECMAscript implementations such as Mozilla´s.

One more thing I found missing in IIS/WSH/Jscript is the name property on a Function object. In a JavaScript running in a browser, you could write:

JavaScript
function MyFunc() { /*dosomething*/ }
alert(MyFunc.name);  //will popup "MyFunc"


Currently I've built a Function.nameOf() helper function which extracts the function´s name from toSource()/toString() by the use of a simple RegEx.

Has anyone some idea how I could build a drop-in function so I gain full code compatibility and reusability between browser and server?
I thought of something like
JavaScript
Function.prototype.name={};
Function.prototype.name.valueOf=function() { /*...*/ }

so ".name" would appear like a property, and the valueOf()-function would be called implicitly as kind of a "get"-accessor.
But no matter how hard I try, i can´t figure out how I can determine from within the valueOf() method, which function was originally called and which´s name is to be extracted.

Any hints or solutions greatly appreciated!
Questionread data from website Pin
Member 79044828-Mar-12 22:01
Member 79044828-Mar-12 22:01 
AnswerRe: read data from website Pin
captnmac9-Mar-12 7:17
captnmac9-Mar-12 7:17 
SuggestionTo disable Back space using javascript Pin
Lalit PB5-Mar-12 22:48
Lalit PB5-Mar-12 22:48 
GeneralRe: To disable Back space using javascript Pin
R. Giskard Reventlov6-Mar-12 10:16
R. Giskard Reventlov6-Mar-12 10:16 
QuestionReading Address Before Browser Loads It? Pin
weinerschizel5-Mar-12 15:26
weinerschizel5-Mar-12 15:26 
AnswerRe: Reading Address Before Browser Loads It? Pin
Luc Pattyn5-Mar-12 17:07
sitebuilderLuc Pattyn5-Mar-12 17:07 
GeneralRe: Reading Address Before Browser Loads It? Pin
BobJanova5-Mar-12 23:52
BobJanova5-Mar-12 23:52 
GeneralRe: Reading Address Before Browser Loads It? Pin
weinerschizel6-Mar-12 8:36
weinerschizel6-Mar-12 8:36 
AnswerRe: Reading Address Before Browser Loads It? Pin
Luc Pattyn6-Mar-12 8:41
sitebuilderLuc Pattyn6-Mar-12 8:41 
AnswerRe: Reading Address Before Browser Loads It? Pin
0bx30-Mar-12 4:55
0bx30-Mar-12 4:55 
Question.exe in java Pin
aliasghar sayadi3-Mar-12 22:30
aliasghar sayadi3-Mar-12 22:30 
AnswerRe: .exe in java Pin
Richard MacCutchan3-Mar-12 23:27
mveRichard MacCutchan3-Mar-12 23:27 
Questionnodejs article moderation state unclear Pin
User 307353-Mar-12 17:43
professionalUser 307353-Mar-12 17:43 
AnswerRe: nodejs article moderation state unclear Pin
Richard MacCutchan3-Mar-12 23:26
mveRichard MacCutchan3-Mar-12 23:26 
AnswerRe: nodejs article moderation state unclear Pin
BobJanova5-Mar-12 0:43
BobJanova5-Mar-12 0:43 
QuestionAccessing another windows variables Pin
Member 43038102-Mar-12 3:16
Member 43038102-Mar-12 3:16 
AnswerRe: Accessing another windows variables Pin
BobJanova2-Mar-12 4:14
BobJanova2-Mar-12 4:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.