Click here to Skip to main content
15,883,854 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hello..

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

Thanks,
Srishti
Posted
Updated 11-Jun-14 2: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

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

Try like this
XML
 <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
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900