Results 1 to 2 of 2

Thread: Resizing an iframe after using javascript history or something?

  1. #1
    Join Date
    Oct 2011

    Resizing an iframe after using javascript history or something?

    hey, can someone help me? im trying to use javascript history to resize an iframe when a submit button is clicked inside the iframe, im a newbie to javascript and i would be you grateful forever if you could help me out!

    this is what i found so far.

    <script type='text/javascript'> 
    function checkHistory() {
    var hist=history.length;
    if (hist>1)//just change value 1 to other if you need :)
    		//redirect or resize or whatever... :P
    3)Us this with iframe:
    but im not really sure on how to apply this to my iframe, and i know that the resize part also needs to be edited, but what is missing? can someone help me out?

  2. #2
    Join Date
    Sep 2009
    I don't really understand what you're trying to do with History, but the code below will let you adjust the size of an iframe. (Note the one line jQuery in <script> tag.)

    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
    	// dimensions are in pixels
    		border:1px solid;
    <div id="test">
    	<iframe src="http://www.faithandpromise.com"></iframe>
    Got jQuery problem? jQuery vault can help you find solutions. Give it a try and find out.

    Click jQuery vault to help us help you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles