Have been reading up on some of Esopo's suggestions.
Being new to web page creation still getting used to the idea of server side and client side programming as separate entities.
The concept of using getElementById() looks perfect for the job however I am struggling to implement it the correct way.
GrandSchtroump raises some good questions so I thought i would try to sell out what I am building and anything else that may help.
disregard if irrelevant, because I don't have the solution I can't make that call.
My programming experience is limited to a few years of part time study.
Mainly languages like C, C++, Delphi and Java(some time ago) along with some scripting using Awk & sed and now a little PHP.
Basically if you can write it using open source compilers.
The application I am writing is for use in an intranet environment at a small scale. am developing a retail point of sale and management package to be used for running an automotive workshop(or similar). This is where I have been working for the last 20 or so years.
The page is constructed using frames (yes I have become aware during this project how this seems to divide web developers) sorry if your anti frames, forgive me and I'll promise not to do it again.
1. Left navigation frame - self explanatory what goes here.
2. Top header frame - Most pages requiring searches have the search fields loaded in the header frame.
3. Main frame. - The main page where the bulk of the entry forms or display of data tables load.
So here is a typical example which involves the use of the said pop up.
1. you (the customer) enter the premises to drop off car for service
2. I (the attendant) ask for some details to create the booking. lets say we start with your cars rego number (number plates, license plate)
3. your not sure of the whole rego only the first 3 letters "ABC' but you have been in before so it should be there.
3 I open the booking section enter the partial rego and search for its existence (this is where the pop up would do its thing) and display a selection of entries starting with 'ABC'
4 I select the correct entry from the pop up which closes and now loads the customer details into the main booking form in the main frame.
If no or an exact match occurs it closes and returns the found record or 0 so that I can select another option to add a new customer;
OK. so here is what I need.
1. when i click on the search button (can be either a type=button or submit )
I need to get the data ('ABC') to the pop up to be used as the search criteria as the pop up form loads. Once its there everything else works.
I have worked out how to read the textfield writing a simple javascript which I can use to initialise a variable but when I try to pass it to the pop up nothing.
so here is what I am doing.(wrong!)
<input name="SubmitSearch" type="submit" id="SubmitSearch" value="Search" onClick="openPopupWindow('/customers/popup.php?searchID=myFunction(id)','ItemLookUp','scrollbars=yes,width=680,height=400' )" />
and any other variation I can think of.
Or could I have the pop up read the searchtext using the onload="" with something like windows.opener.?
Cheers,
Freddy