My issue is this: I call this method twice once inside a function and another in the HTML onclick. Reason is the DIV is part of a context menu. The first function call res is the correct variable I want. The second however changes res b/c Im forced to pass something as res. How do I either keep the value of the first function value of res and have the second invoke but not change res?

Never mind I solved it myself.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.