Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-27-2002, 10:33 PM   PM User | #1
oreo
New to the CF scene

 
Join Date: Jun 2002
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
oreo is an unknown quantity at this point
Question Is this possible?

Is it possible to pass a paramter that will specify the field name on a form? If this is possible what is the correct syntax for writing the function. I can't seem to get it to work.

javascript: populate('hello','TextBox1')


<SCRIPT LANGUAGE = "JavaScript">
<!--
function populate(result,FieldName) {
if (window.opener && !window.opener.closed)
window.opener.document.Form1.FieldName.value = result;
window.close();// -->
}
</SCRIPT>

Thanks!
oreo is offline   Reply With Quote
Old 06-27-2002, 10:35 PM   PM User | #2
adios
Senior Coder

 
Join Date: Jun 2002
Posts: 1,404
Thanks: 2
Thanked 32 Times in 32 Posts
adios is on a distinguished road
window.opener.document.Form1[FieldName].value = result;

http://www.xs4all.nl/~ppk/js/associative.html
adios is offline   Reply With Quote
Old 06-27-2002, 10:39 PM   PM User | #3
oreo
New to the CF scene

 
Join Date: Jun 2002
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
oreo is an unknown quantity at this point
THANKS ADIOS! It worked perfectly!!!
oreo is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:27 PM.


Advertisement
Log in to turn off these ads.