The relationship between area element on the plane and area element of surface for computing flux integrals. I've been reading about surface integrals over vector fields in multivariable calculus, and I've faced a small problem.
The following formula is used to compute the surface integral. Imagine we have a surface $f(x,y,z)=c$ and a vector field $\vec{F}$. Then we have :
$\iint \vec{F}.\hat{n} dS = \iint \vec{F}.\frac{\vec{\nabla}f(x,y,z)}{||\vec{\nabla}f(x,y,z)||}||\vec{\nabla}f(x,y,z)|| dA$
Following this, they have directly computed the integral by plugging $dxdy$ or equivalent, in place of $dA$.
However, this is somewhat wrong, right? We cannot just write $dA=dxdy$, can we?
From my first multivariable calculus class,  I remember, $dxdy=\hat{k}.d\vec{S} =(\hat{k}.\hat{n})dS$.
Thus, $dA = \frac{dxdy}{\hat{k}.\vec{n}} = \frac{dS}{||\vec{\nabla}f(x,y,z)||}$.
For different functions and surfaces $\vec{n}.\hat{k} $, would not be $1$ or any number for that matter. It could even be $g(x)$ or some other function. So, we shouldn't directly say $dA=dxdy$, right?
Isn't this more appropriate. Shouldn't the surface integral be :
$\iint \vec{F}.\hat{n} dS = \iint \vec{F}.\frac{\vec{\nabla}f(x,y,z)}{||\vec{\nabla}f(x,y,z)||}||\vec{\nabla}f(x,y,z)|| \frac{dxdy}{\vec{n}.\hat{k}}$
Writing everything in parametric form removes these difficulties and so on, or we could choose an appropriate coordinate system, in which $dA$ is the surface element. But if we want to integrate into cartesian coordinates, shouldn't the transformation from $dS$ to $dxdy$ be like the way I wrote above?
Shouldn't we divide by $\vec{n}.\hat{k}$ while going from $dS$ to $dxdy$ ? Am I correct ?
 A: 
However, this is somewhat wrong, right? We cannot just write $dA=dxdy$, can we?

I am sure this will be clear if you understand the underlying geometric of the formula you have written. Firstly, understand the graphical meaning of a function:
For a single variable function $y=f(x)$, you can think of it as  raising up the points a line to a curve.  Similarly a multi-variable function of two variables raises up a points on a plane to a surface.
Question: How can we associate the projection of the area on the surface onto plane with the actual area on surface?
Pictures:


From Div, Grad Curl and all that 4th Edition
Intuitively , we can imagine that at each point on the plane, a small patch of area has a different scale factor for it to be related to the area on the surface. We can write : $$dA= P(x,y) dS$$
Question: How do we find $P(x,y)$?
This turns out to be an exercise in geometry.. may remind of you block on ramp from HS physics:

The tilted area on surface is given as $ba=dS$, the area on the flat plane is $b'a=dA$, we know that $b \cos \theta = b'$ and hence:
$$ dS= ba= \frac{b'}{\cos \theta} a = \frac{dA}{\cos \theta}$$
But, how do you get $\cos \theta$? We know that if we are given algebraic curve of the surface $f(x_1,x_2)=C$ then the unit normal is given as $\nabla F$. The angle is just the inclination of the normal with $z$ axis:
$$ dS = \frac{|\nabla f|dA}{\nabla f \cdot \hat{k}}$$
Going back to the original integral:
$$ \int \vec{F} \cdot \hat{n} dS=  \int \vec{F} \cdot \frac{ \nabla f}{| \nabla f|} dA \frac{|\nabla f|}{ \nabla f \cdot \hat{k}}$$
Cancel like terms and we find the required equation. Note that all functions in the above expression are in cartesian coordinates.
