PC Review


Reply
Thread Tools Rate Thread

controlling IFRAME with JavaScript

 
 
=?Utf-8?B?WGVybw==?=
Guest
Posts: n/a
 
      6th Apr 2007
hello,

how can i change the page displayed in an <iframe> element using JavaScript?

(in JavaScript, not the 'target' property of the <a> tag please)

thanks,

Xero
 
Reply With Quote
 
 
 
 
David Berry
Guest
Posts: n/a
 
      6th Apr 2007
Give the frame an ID and name. Ex: id="myFrame" name ="myFrame". Then you
can access it via JavaScript. Ex:

document.frames("myFrame").src = "nextpage.htm"
or
document.all.myFrame.src = "nextpage.htm";


--
David Berry
Microsoft MVP - FrontPage
FrontPage Support: http://www.frontpagemvps.com/
-----------------------------------
To assist you in getting the best answers for FrontPage support see:
http://www.frontpagemvps.com/FrontPa...3/Default.aspx
-----------------------------------


"Xero" <(E-Mail Removed)> wrote in message
news79F4D77-E42C-48C0-A34C-(E-Mail Removed)...
> hello,
>
> how can i change the page displayed in an <iframe> element using
> JavaScript?
>
> (in JavaScript, not the 'target' property of the <a> tag please)
>
> thanks,
>
> Xero



 
Reply With Quote
 
=?Utf-8?B?WGVybw==?=
Guest
Posts: n/a
 
      7th Apr 2007
for some reasons the first one doesn't work
but the second one does.

thanks!

"David Berry" wrote:

> Give the frame an ID and name. Ex: id="myFrame" name ="myFrame". Then you
> can access it via JavaScript. Ex:
>
> document.frames("myFrame").src = "nextpage.htm"
> or
> document.all.myFrame.src = "nextpage.htm";
>
>
> --
> David Berry
> Microsoft MVP - FrontPage
> FrontPage Support: http://www.frontpagemvps.com/
> -----------------------------------
> To assist you in getting the best answers for FrontPage support see:
> http://www.frontpagemvps.com/FrontPa...3/Default.aspx
> -----------------------------------
>
>
> "Xero" <(E-Mail Removed)> wrote in message
> news79F4D77-E42C-48C0-A34C-(E-Mail Removed)...
> > hello,
> >
> > how can i change the page displayed in an <iframe> element using
> > JavaScript?
> >
> > (in JavaScript, not the 'target' property of the <a> tag please)
> >
> > thanks,
> >
> > Xero

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
positioning IFRAME with JavaScript =?Utf-8?B?WGVybw==?= Microsoft Frontpage 3 9th Apr 2007 07:41 AM
Controlling iframe content target Steve Richter Microsoft ASP .NET 0 10th May 2005 11:00 PM
javascript iframe not resizing on browser load Kuv patel Microsoft ASP .NET 1 5th Feb 2004 03:29 PM
IFRAME and JavaScript error? BUG of IE6? Steve Young Windows XP Internet Explorer 0 19th Sep 2003 03:46 AM
Javascript IFrame problem Mike Windows XP Internet Explorer 0 10th Jul 2003 12:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:01 AM.