p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 (http://p2p.wrox.com/forumdisplay.php?f=264)
-   -   VBScript to change target of Iframe (http://p2p.wrox.com/showthread.php?t=67939)

dartcoach May 6th, 2008 11:22 AM

VBScript to change target of Iframe
 
I'm using multiple Iframes on a website.
I would like to set a timer for changing the source html for 1 of the iframes.

I've put the code in to set the timer and I have the process it kicks off.

Problem is setting the iframe source to the variable.

Please Help!


Thanks in advance.

dartcoach

retroviz May 9th, 2008 11:36 AM

Hi Dartcoach,

Personally I would advise against using iframes as they are going against many of the principles outlined in the book (and are generally old hat).

If you are using frames as a way to display common content accross all your pages such as menus/headers/footers you should look into using Master Pages (good explanation in the book).

If however you need some way of updating various content of your page asyncronously without fully posting the page back to the server I would suggest looking into AJAX (http://asp.net/learn/ajax/)

You can achieve what you wish to do quite easily with partial page updates using an UpdatePanel. You can dynamically change the source for your panel at runtime.

Hope this helps.

Retro


dartcoach May 9th, 2008 11:45 AM

Retro,
Thanks for the reply. The reason I don't like CSS and others is that the whole page refreshes and I don't like the bounce.
Using Iframes, I've created a site with a menu Iframe, a main iframe, and and advertisement iframe. When a menu item is chosen, the main iframe's source changes and it looks and acts seamless. Since I'm building this completely with html and vbscript, it makes maintenance and enhancements to the site pretty easy.

Sometimes old hat does just what you want it to do - easily.

I did get the advertisement to work finally.

Thanks again.

dartcoach


All times are GMT -4. The time now is 04:18 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.