get div height

I wanted to get div height in php variable.

You can get the div height via javascript and send it to php via ajax.
You can pass those variables in a form using POST or GET methods.

I’m guessing your logic is wrong. Why do you need to get the height of the DIV?

Yeah lol…

The div might be changing size or he creates it using a form.

I don’t know if I’m missing something, but if the DIV is created using a form, the height is already known?

You are, because form is meant for user input data (mostly), that means the coder doesn’t
know what the div height is. Either way, he will have to use one of the two methods I wrote
in my first post to get the height into a php variable.

FYI… div height can vary by browser, mostly IE, depending on the CSS.

Sponsor our Newsletter | Privacy Policy | Terms of Service