|
Ahhh OK....
So because they are assigning it to an OnClick event, then it needs to be a function instead of just a simple Boolean, and they're trying to have the click do 'nothing', but do this to avoid having the #, instead of just assigning the OnClick to null, or removing the OnClick attribute completely?
Weird... But good to know for sure... Better I learn this trick, than lose faith in the darned supplier I guess.
modified 13-Mar-12 14:36pm.
|
|
|
|
|
That is one confusing sentence, but I think you've got the basic idea.
|
|
|
|
|
The good news is it makes more sense in my brain then in my typing.
I guess the Shame is on me in this case.
Regardless, CP kicks butt at teaching once again, thanks!
|
|
|
|
|
I agree with you. But yet this will do too
<a href="#" onclick='return false'>Click Me</a>
no need to define and entire function hahaha
|
|
|
|
|
Depends on if you want to dynamically toggle the functionality. And there are benefits to keeping your markup clean from inline JavaScript. Also, "önclick" will probably not work.
|
|
|
|
|
it wont work, i wonder how i wrote that character?
|
|
|
|
|
If you are using a "US - International" keyboard layout, you can type that character by typing a quote mark followed by the letter "o".
|
|
|
|
|
Önclick? That definitely sounds Turkish
I'm invincible, I can't be vinced
|
|
|
|
|
because i am Turkish I get it
|
|
|
|
|
I think it would be less misleading if the ReturnFalse function was instead named AbortAction or something closer to the intention.
I think it is better practise to name a function or method for it's intended purpose or meaning than for what it literally does. The intention/meaning and what the method actually does usually are the same, but there can be subtle differences and occasionally vast differences such as in this case.
Oh and a comment for the function would not go amiss either:
function AbortAction()
{
return false;
}
modified 29-Mar-12 16:14pm.
|
|
|
|
|
if (RegistryKeyExists()) {
} else {
CreateRegistryKey();
}
What should we do with such "programmers"?
|
|
|
|
|
|
You should commend them! Seriously, this is good work.
If you consider that most people touching code are idiots, it's always good to duplicate code around, so that if someone messes up one copy, only a small part of your app gets broken, rather then the whole thing.
|
|
|
|
|
Really? is this how you protect your code?
|
|
|
|
|
No - it's how he protects his job
|
|
|
|
|
I don't know if this is appropriate but it make sense
|
|
|
|
|
Yeah! Considering most people touching the code are idiots, we can be sure that they will mess up with something like SVN too.
Peace, ye fat guts!
|
|
|
|
|
You could ask copy shops in the neighbourhood if they have a vacancy...
|
|
|
|
|
You dont have to do anything. eventually the employer will promote them to "managers"
|
|
|
|
|
Sad but true.
Signature construction in progress. Sorry for the inconvenience.
|
|
|
|
|
However, once promoted to a manager they then make decisions on how all programmers should write their code. And they use their own code as a perfect example.
Had one manager who refused to let any developer rewrite the systems that the manager had written!!!
|
|
|
|
|
Shameel wrote: I am sure you misread. There is probably one variable just slightly different which would completely justify the duplication
It's an OO world.
public class Naerling : Lazy<Person>{
public void DoWork(){ throw new NotImplementedException(); }
}
|
|
|
|
|
I was thinking the exact same thing
|
|
|
|
|
Yeah, probably some string value somewhere contains an O instead of a 0
|
|
|
|
|
I inherited one project which has taken n-tier architecture very seriously. First of all it is using WCF by adding reference to the WCF service class directly. There is no service. It is used as a simple class reference. ( Big Fail !!! )
The thing that is really pissing me off is the level of tiers created within the project that has no relevance whatsoever.
UI => BL.Service => BL => DAL=> Database
In this chain all BL.Service Classes and BL classes do is to call methods from its corresponding class above. No logic whatsoever in those one. Just call the method and return value.
UI
dsPClayL = _IWCFPClayL.GetItemInfo(ConfigurationManager.AppSettings["FacilityId"].ToString(), string.Empty);
BL.Service
public DataSet GetItemInfo(string strFaciId, string flag)
{
return _objBLPClayL.GetItemInfo(strFaciId, flag );
}
BL
public DataSet GetItemInfo(string strFaciId , string flag)
{
return _objDLPClayL.GetItemInfo(strFaciId, flag);
}
DAL
This is the one where it connect to database and process request.
Why in the world do you need BL.Service and BL tiers when all it is doing is calling method in DAL...
Zen and the art of software maintenance : rm -rf *
Math is like love : a simple idea but it can get complicated.
|
|
|
|