Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


writing to the child window



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> JavaScript Forum
View previous topic :: View next topic  
Author Message
clyde



Joined: 04 Mar 2008
Posts: 2

PostPosted: Tue Mar 04, 2008 4:16 am    Post subject: writing to the child window Reply with quote

Using document.write works fine, but I want to write to an anchor tag in the child popup window. I tried:

mychildWin.document.getElementById("childAnchor").value = "Hello";

which fails and when I popup an alert(mychildWin.document.links[0].value);
I get null. But the popup has this element.

When I use mychildWin.document.write("hello"); the hello appears fine.

What am I missing here?
Back to top
View user's profile Send private message
rangana
250+ Club


Joined: 27 Feb 2008
Posts: 439
Location: Cebu City Philippines

PostPosted: Tue Mar 04, 2008 4:59 am    Post subject: Re: writing to the child window Reply with quote

I suppose it should be:
Code:

document.getElementById('childAnchor').innerHTML = 'Hello';


See if it helps Very Happy
Back to top
View user's profile Send private message Yahoo Messenger
clyde



Joined: 04 Mar 2008
Posts: 2

PostPosted: Thu Mar 06, 2008 4:55 am    Post subject: Thanks for your help Reply with quote

I am afraid it did not work either. When I check to see if the anchor is there I get null. Even tho my child window has this:

<a href="#" id="childAnchor">Hi</a> and I see the "Hi" on the page.
It claims that there is no element in mywin.document.getELementById("childAnchor");

I am confused. Sad
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> JavaScript Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap