HighDots Forums  

Re: How to get FORM values from an IFRAME ?

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: How to get FORM values from an IFRAME ? in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Danny
 
Posts: n/a

Default Re: How to get FORM values from an IFRAME ? - 10-01-2005 , 03:15 AM








Ding dong!, frames[] collection is at the window level, not document,
including iframes, so, window.frames[0].



Danny

Reply With Quote
  #2  
Old   
djdave
 
Posts: n/a

Default Re: How to get FORM values from an IFRAME ? - 10-03-2005 , 02:59 AM






Sorry Danny, but i still got the problem

(...)
// HERE'S MY PROBLEM: IT DISPLAYS ANYTHING !!!
document.write(window.frames[0].document.forms[0].elements[0].value);
(...)

Djdave


Reply With Quote
  #3  
Old   
Randy Webb
 
Posts: n/a

Default Re: How to get FORM values from an IFRAME ? - 10-03-2005 , 05:40 AM



djdave said the following on 10/3/2005 2:59 AM:
Quote:
Sorry Danny, but i still got the problem
Ignore Danny, he seems to think that replying to nothing is the way to
post here, it's not. Please quote what you are replying to, this is
Usenet, not Email.

Quote:
(...)
// HERE'S MY PROBLEM: IT DISPLAYS ANYTHING !!!
document.write(window.frames[0].document.forms[0].elements[0].value);
It won't be available until after the element in the form in the
document in the frame is loaded. In your sample code, it is trying to
access something that hasn't been loaded yet. Try changing it to the
onload event and alert it and see what you get.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly


Reply With Quote
  #4  
Old   
djdave
 
Posts: n/a

Default Re: How to get FORM values from an IFRAME ? - 10-03-2005 , 11:14 AM



Danny,

It works well when i've a form without iframe.

So, why it shouldn't when a form is insite a iframe ?

Furthermore, i need it works before the form is submitted.

Thanks.


Reply With Quote
  #5  
Old   
djdave
 
Posts: n/a

Default Re: How to get FORM values from an IFRAME ? - 10-03-2005 , 11:19 AM



Danny,


It works well when i've a form without iframe.


So, why it shouldn't when a form is inside a iframe ?


Furthermore, i need it works before the form is submitted.


Thanks.


Reply With Quote
  #6  
Old   
Randy Webb
 
Posts: n/a

Default Re: How to get FORM values from an IFRAME ? - 10-03-2005 , 12:39 PM



djdave said the following on 10/3/2005 11:19 AM:

Quote:
Danny,
This is Usenet, not Email.

Please quote what you are replying to.

Quote:
It works well when i've a form without iframe.


So, why it shouldn't when a form is inside a iframe ?
Because your referencing is incorrect.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Answer: Not quoting at all.
Question: Whats worse than top-posting?
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?


Reply With Quote
  #7  
Old   
djdave
 
Posts: n/a

Default Re: How to get FORM values from an IFRAME ? - 10-03-2005 , 12:47 PM



Ok, but could you please tell me the referencing i've to use ?

(i'm javascript's beginner and my english isn't very good !!!)

Thanks for your help.


Reply With Quote
  #8  
Old   
Randy Webb
 
Posts: n/a

Default Re: How to get FORM values from an IFRAME ? - 10-03-2005 , 04:41 PM



djdave said the following on 10/3/2005 12:47 PM:

Quote:
Ok, but could you please tell me the referencing i've to use ?
You begin by quoting what you are replying to.

If you want to post a followup via groups.google.com, don't use
the "Reply" link at the bottom of the article. Click on "show
options" at the top of the article, then click on the "Reply" at
the bottom of the article headers.

Quote:
(i'm javascript's beginner and my english isn't very good !!!)
Nothing wrong with not being good in English.

Show a sample URL of a sample page that you can't get to work.


--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.