If $I\subseteq J\subseteq A$ have same image in localization by all maximal ideals, then $I=J$ I will state my question first:

Suppose $I\subseteq J\subseteq A$ are two ideals in a commutative ring $A$. Furthermore, assume
  that for every maximal ideal $\mathfrak{m}$ of $A$, the image of $I$
  and $J$ under the canonical map $A\to A_{\mathfrak{m}}$ is the same.
  How can I prove that $I=J$ ?

The aforementioned canonical map $A\to A_{\mathfrak{m}}$ is $a\mapsto a/1$. 
My attempts: I think we might need to use the following fact. If $f: M\to N$ is $A$-module homomorphism, then the following statements are equivalent:
1) $f$ is injective.
2) The induced map $f_{\mathfrak{m}}: M_{\mathfrak{m}}\to N_{\mathfrak{m}}$ is injective for every maximal ideal $\mathfrak{m}$ of $A$.
Now, if we let $M=I$ and $N=J$ (as ideals of $A$ are naturally $A$-modules), then the inclusion map $i: I\to J$ is injective. So, the induced maps $i_{\mathfrak{m}}: I_{\mathfrak{m}}\to J_{\mathfrak{m}}$ are also injective, for each maximal ideal $\mathfrak{m}$ of $A$. Now I would like to use the fact that $I$ and $J$ have same extensions in $A_{\mathfrak{m}}$. Can this approach be made to work? 
Thanks for your time.
 A: Theorem
If $I,J$ are ideals of a commutative ring $A$ such that $I_{\mathfrak{m}}=J_{\mathfrak{m}}$ for all maximal ideals $\mathfrak{m}$ of $A$, then $I=J$.
Proof
Let us assume, for a contradiction, that $I\not\subseteq J$ and let $x\in I\setminus J$. The set $(x:J)=\{a\in A:ax\in J\}$ is an ideal of $A$. If $I_{\mathfrak{m}}=J_{\mathfrak{m}}$ for all maximal ideals $\mathfrak{m}$ of $A$, then $(x:J)$ is not contained in any maximal ideal of $A$. Therefore, $(x:J)=A$, i.e., $x\in J$; a contradiction. Conversely, one can prove that $J\subseteq I$ and conclude that $I=J$. Q.E.D.
An exercise that provides practice with the proof technique above:
Exercise 1: If $A$ is a commutative ring in which every prime ideal is finitely generated, then every ideal is finitely generated, i.e., $A$ is Noetherian. (Hint: use proof by contradiction. Let $S$ be the set of all non-finitely generated ideals of $A$ and note that $S$ is partially ordered with respect to inclusion. If $S\neq \emptyset$, then check that the hypothesis of Zorn's lemma applies, so that $S$ has maximal elements. If $I\in S$ is a maximal element, then prove that $I$ is a prime ideal of $A$; a contradiction. Q.E.D.)
I hope this helps! (The proof is short so you might need to think a little bit in order to digest it.)
A: Use that $M_{\mathfrak m} =0$  for all maximal ideals $\mathfrak m$ iff $M=0$. (Here $M=J/I$, of course.) 
