This is a discussion on "Create DIV contents OnLoad from textbox value" within the JavaScript Forum section. This forum, and the thread "Create DIV contents OnLoad from textbox value are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Create DIV contents OnLoad from textbox value
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
OK, I'll try to explain this as clearly as possible.
I have a frameset, let's call the frames A and B. I'm loading MyPage.htm into frame B from a link in frame A. No problems yet. When the page loads, I want the contents of a DIV or SPAN area in myPage.htm to equal the value of a textbox in a form on the page in frame A. Let's say it's a DIV, and name the DIV "one." To clarify: If I was working with a textbox on MyPage.htm I'd just write: document.forms[0].elements[0].value==top.A.document.forms[0].elements[0].value And be done with it. But it's not a textbox, it's just an area of text inside a CSS tag. So I'm missing a parameter here. I need to be able to say (DIV tag one text) ==top.A.document.forms[0].elements[0].value . . . but I don't know how or what to call (DIV tag one text). I was fooling with .innerHTML but it looks like I'm barking up the wrong tree. I keep telling myself there's a simple solution out there. Any ideas? |
|
|
|
||||
|
Re: Create DIV contents OnLoad from textbox value
Is it 100% nessesary to use frames?
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
![]() |
| Tags |
| create, div, contents, onload, textbox, value |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] Validate Problems With onload | Geeky Girl | Web Page Design | 3 | Mar 25th, 2008 10:46 |
| Is the onload event only for <body> tag??? | Love2Java | JavaScript Forum | 7 | Jul 30th, 2007 12:44 |
| focus() onLoad | Jaken Veina | JavaScript Forum | 1 | Apr 22nd, 2006 17:34 |
| problem with Image Object's onLoad function | jono | JavaScript Forum | 2 | Jan 10th, 2005 08:10 |