473,327 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

how to pass popup values to the parent form

Hi
I am writing this code wherein i m opening a popup window to find out the short code of a place. as soon as i type the letters it gives me all the codes starting from that letter in a drop down menu fashion, but when i am click on one, it does not add that value to the form text feild. the code is here

<input name="departFrom" type="text" id="departFrom" />
<a href="javascript:;" onClick="MM_openBrWindow('airport_search.php','ter ms','scrollbars=yes,width=425,height=300')">

Can anyone help me please??

thanks in advance
Jun 7 '07 #1
7 5029
Motoma
3,237 Expert 2GB
I have moved this question to the Javascript forum with the hopes that the experts there will be able to provide you with more information that those in PHP.
Jun 7 '07 #2
epots9
1,351 Expert 1GB
well in your function MM_openBrWindow, u got window.open(), it returns a value, so store it
Expand|Select|Wrap|Line Numbers
  1. var popup = window.open("page.html")
Jun 7 '07 #3
Thanks for the reply but when i add this command, its showing a error saying that A tag is not supported.
<input name="arrivalTo" type="text" id="arrivalTo" />
<a href="javascript:;" onClick="MM_openBrWindow('../../../../Desktop/airport_search.php','terms','scrollbars=yes,width= 425,height=300')" ><img src="../../../../images/questionMarkLg.jpg" width="18" height="19" align="absmiddle" class="imgBorder" /></a></td>

upon clicking the place code its showing the full place code in the popup window. but what i want that upon clicking it should add that place code in the text feild "arrivalTo" in the parent page of addairport.php
please can u give me the full code along with where it should be placed. its urgent.
Jun 8 '07 #4
well when i added that command, the page popup page itself is not showing, saying page cannot be found
the function code is:
function MM_openBrWindow(theURL,winName,features) {
var popup = window.open(theURL,winName,features);
}

Is there any other method??

Thanks in advance
Jun 8 '07 #5
acoder
16,027 Expert Mod 8TB
You're showing the code in the parent page.

In the popup page, you need to use:
Expand|Select|Wrap|Line Numbers
  1. window.opener.document.getElementById('departFrom').value=the value from the dropdown...
Jun 9 '07 #6
Thnaks a lot. It works now.
Jun 11 '07 #7
Motoma
3,237 Expert 2GB
Thnaks a lot. It works now.
Glad you have found your answer, come back anytime you have a question.
Jun 11 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

38
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
1
by: VbUser25 | last post by:
hi.. i have a drop-down menu with a list of products.when i select any one product i open a popup displaying hte product categories in it.i then enter the no. of items i want.and finally when i...
2
by: maxrawson | last post by:
Greetings all: I have an asp.net application that is coded mainly in vb.net. I have successfully cut and pasted some javascript into my application that mimicks the datetime picker control in...
2
by: umashd | last post by:
Hi, I am doing a web based project for my graduation. I studied bit of java for backend processesing and javascript for the client. Here is the scenario. In the FORM, I use INPUT TYPE=text...
4
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a...
1
by: Richard Coutts | last post by:
I have a Continuous Form where each record has a button that activates another form that simplifies entering values into the record. The activated form has the equivalent of a "Done" button. I'd...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
1
by: praveenit | last post by:
hi, I am writing a small java script code where , when the textbox is clicked a pop up window is opened . on entering some data in the text area present in pop up window and pressing ''save"...
1
by: colleen1980 | last post by:
Hi: Can any one please tell me that how to i pass the two textbox values in the new page. If i use the form action in the popup window page then the new page is open in the same popup window as i...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.