It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Get info. from pop up windows & send it to the main page

Get info. from pop up windows & send it to the main page

Postby Nothing2Lose on Fri Apr 29, 2005 10:36 pm

hi all :)

How can I have main page that has text field & link (onClick) I get Pop-up window that contains a list of stuff, so when I picked up one of these stuff from the list then the pop-up windows will send it to text field in the main page, pleas check this illu to get more details ;)

Main page, on click pop-up windows shown up:



pop-up windows has list to choose from:



If I got one item from the list, pop-up window will send it to the main page
text field:



Regards
Last edited by Nothing2Lose on Tue May 10, 2005 8:20 am, edited 1 time in total.
Nothing2Lose
 
Posts: 28
Joined: Fri Apr 08, 2005 7:26 am

Postby dafunkymunky on Sat Apr 30, 2005 11:51 am

hi nothing2lose

here is the solution

copy this code and save it as test1.html

<HTML>
<SCRIPT LANGUAGE="JavaScript" SRC="myscript.js">
</SCRIPT>
<form name=frm>
<input type=button name=but value="Click here" onClick="var popup = open('pop.html','','width=300,height=300')">
<input type=text name=txt>
</form>
</HTML>

and save this as pop.html(besure to save it as pop.html in the same folder)

<html>
<a href="javascript: void('');" onclick="opener.document.frm.txt.value = 'Knowledge is Power';">Click here to inmput knowledge is power to the parent window</a>
</html>

well i have tested in firefox and it works works in IE as well not sure after which version

and if you are a rookie and dont understand much of the code well you can post a reply for the exact code you need i would be glad to help you. and if you arent may be you would figure out from this code what you want

i am using the opener function to input the text into the text box
if you have found out the soulution dont forget to select the solved tag for this post and also post the code you have used


--DAFUNKYMUNKY
User avatar
dafunkymunky
100+ Club
 
Posts: 183
Joined: Fri Apr 08, 2005 7:32 am
Location: India

Postby Nothing2Lose on Sat Apr 30, 2005 10:17 pm

thanx DAFUNKYMUNKY,

it works fine. Regarding to put [SOLVED] tag if I got the answer, does this mean that I can not ask any thing related to this subject, if so I wont ;)


Code: Select all
IF ([Solved] == [Closed])
   {
         My.Action = "I wont";
    }
ELSE
   {
        My.Action = "I will";
    }
Last edited by Nothing2Lose on Sun May 01, 2005 1:14 am, edited 1 time in total.
Nothing2Lose
 
Posts: 28
Joined: Fri Apr 08, 2005 7:26 am

Postby Phate on Sun May 01, 2005 12:28 am

If you use the "solved" function, you are just showing to everybody that you have an answer for your problem.

You can always open a new thread
:)
Web-Developing since '03
Image
User avatar
Phate
500+ Club
 
Posts: 826
Joined: Sun Nov 21, 2004 4:12 am
Location: 127.0.0.1

Postby dafunkymunky on Sun May 01, 2005 5:54 am

hi nothing2lose well you can post anything even after the solved tag as phate puts it it only suggests you have a solution

--DAFUNKYMUNKY
User avatar
dafunkymunky
100+ Club
 
Posts: 183
Joined: Fri Apr 08, 2005 7:32 am
Location: India


Who is online

Users browsing this forum: No registered users and 3 guests