|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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! |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
|||
|
|||
|
take a look here
http://forums.devarticles.com/t9446/s.html |
![]() |
| Viewing: Dev Articles Community Forums > Programming > JavaScript Development > Passing text data from one frame to another |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|