Create DIV contents OnLoad from textbox value

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.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 30th, 2006, 21:10
New Member
Join Date: Jan 2006
Age: 48
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Question Create DIV contents OnLoad from textbox value

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?
Reply With Quote

  #2 (permalink)  
Old Feb 7th, 2006, 20:31
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
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
Reply With Quote
Reply

Tags
create, div, contents, onload, textbox, value

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 On

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


All times are GMT. The time now is 10:50.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

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