Click here to Skip to main content
15,913,928 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have 2 frames in my web page,if i hide the right frame the other frame should acquire the whole screen and there should also be a unhide button for vice-versa.
Thanks in advance.
Posted

1 solution

You can use the client-side frameworks or libraries to do this. For example, you can use jQuery to hide or show the iframes.

JavaScript
$('button').click(function() {
   // Show or hide using $('#iframe1').show() and so on
});


Then you can use some CSS based styling techniques to change the width of the elements (iframe).
 
Share this answer
 
Comments
Raghu S Gowda 2-Apr-15 1:58am    
I have written a code like this:

$(document).ready(function () {

$("#hide").click(function () {
$("#CTI").hide();

});

Its not hiding,just refreshing the page
Afzaal Ahmad Zeeshan 2-Apr-15 2:06am    
Then tell me one thing, is your button a submit button? You need to override it. Add event.preventDefault() above $("#CTI").hide(). Then it will not reload the page.
Raghu S Gowda 2-Apr-15 2:42am    
Nope its an image button.

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