Solved

dynamically get master page div dimensions

Posted on 2011-03-13
5
388 Views
Last Modified: 2012-05-11
I have a DIV wrapper incorporating the various controls on and asp.net master page. I'd like to access the DIV height from the content page and programmatically change that height prior to pre-rendering the page. Is this doable?
0
Comment
Question by:eehunter3
  • 3
  • 2
5 Comments
 
LVL 40

Expert Comment

by:gurvinder372
ID: 35122949
Yes, it is doable. You just need to get the Id of that div, and then you can get or set its height

alert( document.getElementById("divId").style.height ); //getting the height
document.getElementById("divId").style.height = "100px"; //setting the height
0
 

Author Comment

by:eehunter3
ID: 35123163
I think this might work but I am not familiar with javascript. Is there a VB.NET counterpart? Or can you be a little more explicit as to what javascript code goes on the master page and what goes on the content page to access the DIV's properties?.
0
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 250 total points
ID: 35123175
check this page
http://www.w3schools.com/jsref/dom_obj_style.asp

I have no experience in VB.net, so Sorry, can't suggest anything else.
0
 

Assisted Solution

by:eehunter3
eehunter3 earned 0 total points
ID: 35123262
Back in a few .... Taking a quick tutorial in javascript and reviewing the link you have suggested.
0
 

Author Closing Comment

by:eehunter3
ID: 35178788
Made a mistake ... did not mean to credit myself with providing answer.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
links not working 2 27
Accordion won't close correctly 5 14
SVG and IE11 2 18
Jquery HTML() with ajax... replacing content 2 31
This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question