Welcome to Tech Support Forum home to more then 136,000 problems solved. Issues have included: Spyware, Malware, Virus Issues, Windows, Microsoft, Linux, Networking, Security, Hardware, and Gaming Getting your problem solved is as easy as:
1. Registering for a free account
2. Asking your question
3. Receiving an answer

Registered members:
* Get free support
* Communicate privately with other members (PM).
* Removal of this message
* See fewer ads.
* And much more..

 



Want to know how to post a question? click here Having problems with spyware and pop-ups? First Steps
Go Back   Tech Support Forum > Design Forum > Web Design & Programming
User Name
Password
Site Map Register Donate Rules Blogs Mark Forums Read


Web Design & Programming Discussion of web design, and server-side & client-side scripting

Reply
 
LinkBack Thread Tools
Old 12-24-2006, 09:17 AM   #1 (permalink)
Registered User
 
enoctis's Avatar
 
Join Date: Aug 2005
Location: Ft. Hood, TX
Posts: 59
OS: WinXP.pro

My System

Send a message via AIM to enoctis Send a message via Yahoo to enoctis
Arrow Loop Script / Parent Document

Ok, I typed out this long message trying to explain what I was attempting to get done. Good thing I realized that chances are I was confusing people. Let me make this as harmless as possible...

I need help with 2 scripts. The first one I want to loop to constantly check the size of the iframe. The script is as follows (and it works now, but doesn't loop):

Code:
function resizeToContent(){
     var x =0;
     var y =dynamIframe.document.body.scrollHeight;
     while (x < y){x+=1;}
     this.document.getElementById("dynamIframe").style.height=x+10}
Of course, the iframe to be resized is given the id "dynamIframe". When this function is called it resizes the iframe. How do I make it loop? I've tried, but failed.

The second work-around that I'm trying to get accomplished (one of these 2 will be better) is the same code as above, except that I want it to check the parent document's iframe as well. The parent document's iframe will have the same ID.

I know it will work because I'm using it now with both iframes (an iframe within another). The problem is that when the content in the sub-iframe changes the iframes won't resize. I can't modify the file that is being loaded into the sub-iframe, therefore, the loop has to be called by the page loaded inside the mainpage (the one that contains the sub-iframe).

Any help is greatly appreciated! If you can only help with one and not the other, that's fine.

-Enoctis
enoctis is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Important Information
Join the #1 Tech Support Forum Today - It's Totally Free!

TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free.

Join TechSupportforum.com Today - Click Here

Old 12-27-2006, 06:55 AM   #2 (permalink)
Retired
 
gamerman0203's Avatar
 
Join Date: Oct 2005
Location: Grand Rapids, MI
Posts: 2,144
OS: XP MCE, Ubuntu Gutsy

My System

a good way of doing the loop would be to make a for loop. I'm still lost as to how/why it would constantly be resizing it self for the need of the loop. Can you elaborate more?
gamerman0203 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-27-2006, 05:31 PM   #3 (permalink)
Registered User
 
enoctis's Avatar
 
Join Date: Aug 2005
Location: Ft. Hood, TX
Posts: 59
OS: WinXP.pro

My System

Send a message via AIM to enoctis Send a message via Yahoo to enoctis
Question elaboration it is...

i have an iframe within an iframe in a design im working on. why? because the first iframe is for the content on my page, while the second contains a bulletin board. i don't want the bulletin board opened in a seperate window, or to replace the mainpage. furthermore, i know that i could eliminate the second (sub) iframe and have the bulletin load in the mainpage's iframe. BUT i want to have other info on the mainpage. the iframes are necessary for the layout i have designed.

but that's not the real problem. the problem is that when the page loads it resizes the iframe (both, actually) to the content within. that's fine & dandy until they click a link inside the iframe. the new content loads - hooray! - but the iframe never resizes...
enoctis is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Old 12-27-2006, 05:36 PM   #4 (permalink)
Registered User
 
enoctis's Avatar
 
Join Date: Aug 2005
Location: Ft. Hood, TX
Posts: 59
OS: WinXP.pro

My System

Send a message via AIM to enoctis Send a message via Yahoo to enoctis
Roll Eyes work-around

i REALLY don't want to do this, but if necessary i will go through all of the pages in my bulletin (which is about 200) and add a "onclick" tag to all of the links.

PLEASE don't make me do that, lol.
enoctis is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -7. The time now is 02:12 PM.



Copyright 2001 - 2009, Tech Support Forum
Home Tips Plus | Outdoor Basecamp | Automotive Support Forum

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85