•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 423,343 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 5,165 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 853 | Replies: 0
![]() |
•
•
Join Date: May 2008
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
I keep getting sent back and forth between the java and php forums so I'm not sure which language would be best for this anymore...
Here's my original question:
"I have a normal html document with an iframe pointed to a .php document (with links to other php documents). I would like the iframe height an/or width to change when page in the iframe changes. For example the initial page would generate an iframe height/width of 800/600. When you click a link in the iframe, the height/width would change to 600/400. Then yet another link would change the iframe, hight/width to 400/900.
I was thinking that i could somehow have variables for height and width set on each of the php documents that might show up in the iframe, and that each time a new page was loaded in the frame the new height/width variables would be sent to the parent frame, and the parent frame would refresh generating an iframe with the new dimensions.
I hope it is clear what I'm trying to do, I can try to clarify if necessary. The main point is I want an iframe to change dimensions base on the content. I don't mind if the parent frame has to refresh, but it must be automatic.
I don't really know much about php code, so I don't know if the idea I explicated above is the best method, or even if it is possible. If there is a better way please tell me how. If it is the best way, how would I code that?"
Thanks,
David
Here's my original question:
"I have a normal html document with an iframe pointed to a .php document (with links to other php documents). I would like the iframe height an/or width to change when page in the iframe changes. For example the initial page would generate an iframe height/width of 800/600. When you click a link in the iframe, the height/width would change to 600/400. Then yet another link would change the iframe, hight/width to 400/900.
I was thinking that i could somehow have variables for height and width set on each of the php documents that might show up in the iframe, and that each time a new page was loaded in the frame the new height/width variables would be sent to the parent frame, and the parent frame would refresh generating an iframe with the new dimensions.
I hope it is clear what I'm trying to do, I can try to clarify if necessary. The main point is I want an iframe to change dimensions base on the content. I don't mind if the parent frame has to refresh, but it must be automatic.
I don't really know much about php code, so I don't know if the idea I explicated above is the best method, or even if it is possible. If there is a better way please tell me how. If it is the best way, how would I code that?"
Thanks,
David
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Dynamic iFrame height, not working in ie without refresh. (JavaScript / DHTML / AJAX)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Array
- Next Thread: Javascript - Validation


Linear Mode