JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old August 4th, 2004, 06:01 PM
sirtom sirtom is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 11 sirtom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 57 m 11 sec
Reputation Power: 0
Question Passing text data from one frame to another

Well I have page with 3 frames. Upper (1) , middle (2) and bottom (3). What I want to do is to pass selected text in frame 3 with help of buttons in frame 2 into frame 1 different textfields and textareas. I use frame 3 to browse web to collect data. In frame 1 I just save data into database.
Well I found this scrip that does it in one page inside certain form
<SCRIPT LANGUAGE="JavaScript">
function copyit(theField) {
var selectedText = document.selection;
if (selectedText.type == 'Text') {
var newRange = selectedText.createRange();
theField.focus();
theField.value = newRange.text;
} else {
alert('select a text in the page and then press this button');
}
}
</script>

<body>
<form name="it">
Here is written some text
//this button copys any text in page
<input onclick="copyit(this.form.select1)" type="button" value="Kopeeri" name="btnCopy"></td>
//and puts it onclick into texarea named select1
<textarea name="select1" rows="4" cols="45"></textarea>
</form>
</body>

Is there anyway around this to make buttons I have in frame 2 onclick copy selected text in frame 3 and pass the data into frame 1 any texarea or textfield. And different buttons would pass text into differnet textareas.

Dont be hard on me I am a beginner but I really need to get this work!

Reply With Quote
  #2  
Old August 4th, 2004, 06:15 PM
sirtom sirtom is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 11 sirtom User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 57 m 11 sec
Reputation Power: 0
Unhappy

I tied this script with to different buttons. One copies selected text and puts into textarea named just lets say area1 and other button copies selected text and puts it into textfield named field1.
Works perfectly.
Now if I could only to make it copy selected text from different frame and put yet into another frame.

Reply With Quote
  #3  
Old August 7th, 2004, 01:57 PM
Think Pink Think Pink is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 4 Think Pink User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
take a look here
http://forums.devarticles.com/t9446/s.html

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Passing text data from one frame to another


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway