Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

dynamically get master page div dimensions

Posted on 2011-03-13
5
Medium Priority
?
403 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
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:
Gurvinder Pal Singh earned 1000 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

Independent Software Vendors: 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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
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…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

715 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