Click here to Skip to main content
14,391,646 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello..

how to set page height dyanmically to call in iframe in xsl

Thanks,
Srishti
Posted
Updated 11-Jun-14 3:13am
v3
Comments
Nirav Prabtani 11-Jun-14 3:38am
   
iframe in xsl means?
Sampath Lokuge 11-Jun-14 4:06am
   
Can we have more info about your requirement ?
srishti_ 11-Jun-14 5:09am
   
<iframe src="../asptonet/asptonet1.asp?DestPage=../DynamicPages/immunization_annotation.aspx" height="100%" frameborder="0" width="100%" id="frm_immunization" name="frm_immunization" SCROLLING="no"></iframe>


this is the code i want to set height attribute dynamic according to content of page
Sampath Lokuge 11-Jun-14 5:46am
   
Is it ok to use jQuery ?
SRS(The Coder) 11-Jun-14 6:11am
   
In jQuery right ?

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Hi First get height of the browser window using jquery and pass that height using css to iframe.

Try like this
 <script language="javascript" type="text/javascript">
FixWindowsHeightAndWidth{
   winHight = $(window).height();
        $('.center').css({ "height": winHight + "px" });
      }

 window.onresize = FixWindowsHeightAndWidth; 



<iframe src="../asptonet/asptonet1.asp?DestPage=../DynamicPages/immunization_annotation.aspx"  class="center" frameborder="0" width="100%" id="frm_immunization" name="frm_immunization" SCROLLING="no"></iframe>


Try to get window height for browser or screen using jquery and pass that hegith to iframe use Class or cssclass.So if u resize browser the iframe height also resize based on heigth.


Regards
Aravind
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100