Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > How to get the html elements of Iframe from the Parent page byjavascript

Reply
Thread Tools

How to get the html elements of Iframe from the Parent page byjavascript

 
 
panore
Guest
Posts: n/a
 
      01-22-2010
Hello Friends,

I have a parent page containing an iframe which load an another page
with radio buttons in it.

Now i have to get the iframe radio buttons from the parent page to
work on.

I have used the following script to get the radio button but didint
worked

i.e
window.frames['frame01'].document.getElementById('idname')
top.document.getElementById('iframe').form[0].elements
parent.document.getElementById('iframe').form[0].elements

any suggestions to do it

regards
sunil panore

 
Reply With Quote
 
 
 
 
Dr J R Stockton
Guest
Posts: n/a
 
      02-23-2010
In comp.lang.javascript message <050bbfd2-37de-42c8-bce2-0809d3b7940a@e2
7g2000yqd.googlegroups.com>, Fri, 22 Jan 2010 03:22:05, panore
<> posted:
>Hello Friends,
>
>I have a parent page containing an iframe which load an another page
>with radio buttons in it.
>
>Now i have to get the iframe radio buttons from the parent page to
>work on.
>
>I have used the following script to get the radio button but didint
>worked
>
>i.e
>window.frames['frame01'].document.getElementById('idname')
>top.document.getElementById('iframe').form[0].elements
>parent.document.getElementById('iframe').form[0].elements



<URL:http://www.merlyn.demon.co.uk/linxchek.htm> loads an iframe and
reads its links, anchors, and source text; reading it might help you.


Your "didint worked" is not helpful - perhaps you are a guess'n'pray
coder - you should say what happened and what error messages your
browser showed.

You can build up such expressions element by element, testing with
alert(typeof ...) at each step to see which parts work.

It's a good idea to read the newsgroup c.l.j and its FAQ. See below.

--
(c) John Stockton, nr London UK. ?@merlyn.demon.co.uk IE7 FF3 Op9 Sf3
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
 
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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
ASp.net How to get textbox values generated byJavascript Sandesh Daddi ASP .Net 0 08-01-2008 02:00 PM
ASp.net How to get textbox values generated byJavascript Sandesh Daddi ASP .Net 0 08-01-2008 01:56 PM
Get parent iframe element in iframe Cleaner1912@gmail.com Javascript 0 09-27-2006 05:16 AM
Set Parent Scroll Position - parent page and iframe on seperate domains PD Javascript 6 05-09-2006 03:37 PM



Advertisments
 



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