Hi,
I've found a great website which can extract data from a MySQL database and populate chained drop downs. (http://www.noboxmedia. com/20/massive-ajax-countryarea-drop-down-list/)
I'd like the option of a user "dynamicall y" uploading their Excel file, extracting certain data, and including their data in the drop downs too. All this without the users data needed to be stored on the server longer than necessary.
The only way I can see how to do this is use PHP to read the Excel file (via phpexcelreader) , MySQL to create a temporary table uisng this data, PHP to set global variables based on the users data in the table, and finally reload the original webpage with the addition page content taken from the global variables.
This seems a bit too complex. Does anyone know of an easier way - or even better - a web site which has an example?!
Thanks!
4 1676 acoder 16,027
Recognized Expert Moderator MVP
The only way I can see how to do this is use PHP to read the Excel file (via phpexcelreader) , MySQL to create a temporary table uisng this data, PHP to set global variables based on the users data in the table, and finally reload the original webpage with the addition page content taken from the global variables.
This seems a bit too complex. Does anyone know of an easier way - or even better - a web site which has an example?!
An alternative would be to avoid creating the table in MySQL. Just use PHP to generate the options for the drop down or use XML/JSON and echo the results. Then return this as a result to an Ajax request. As for the actual upload, this isn't really possible with Ajax, but you can use iframes to achieve the same effect.
Thanks for the reply!
I stumbled upon an iframes example - but from what i've heard, iframes can act funny with certain browsers. I was hoping to avoid that.
Thanks again!
acoder 16,027
Recognized Expert Moderator MVP This one seems to work pretty well.
Thanks for the suggestion...
That site was one of the first I looked at - and although it uses Iframes, you are right, as it seems to work on IE6, FF2, and Safari.
I guess Iframes are supported better than I was lead to believe.
Cheers!
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: chuck amadi |
last post by:
By the way list is there a better way than using the readlines() to
> > >parse the mail data into a file , because Im using
> > >email.message_from_file it returns
> > >all the data i.e reads one entire line from the file , headers as
well
> > >as just the desired body messages .
> > >
> > >fp = file("/home/chuck/pythonScript/testbox")
> > >mb = mailbox.UnixMailbox(fp,
> > >email.message_from_file)
|
by: Kingdom |
last post by:
I'm using this script to dynamicaly populate 2 dropdowns and dispaly the
results. Choose a component type from the first drop down, lets say
'car' and the second box will list all the car 'manufacturers' and the
display will then provide all the rest of the info from the other fields.
I need to eliminate all the duplicates in the First Drop Down as it
currently displays an entry for every record, many are identical, I might
have over...
|
by: Mong |
last post by:
Hi,
I've developed an ASP.net application for an intranet site. Users will
be identified using Windows authentication and they will belong to one
of two roles, Admin or Users. The application uses frames with a
contents frame down the left which at the moment consists of html
tables with a href in each one which will show the appropriate page in
the main frame. Nothing too fancy.
Now, what I want to do is only show the appropriate...
|
by: mart2006 |
last post by:
I've created a dynamic drop down menu that populates itself with data from a MySQL table. What I would like to do is create a non dynamic drop down menu that alters what is shown in the dynamic menu.
For example, the first menu has three cities London, Paris, New York. If I choose London it populates the second menu with people from London.
Here is the code I have for my dynamic menu
<td valign=top><strong>Name:</strong></td>
<td>...
|
by: Jim in Arizona |
last post by:
My goal, somehow, is to populate a dropdownlist with all the user names
in active directory. I don't even know where to begin, really.
I added a reference to System.DirectoryServices so I could use the
System.DirectoryServices.ActiveDirectory namespace. I don't even know if
this is the right way to go as I can't seem to find anything in that
namespace that would help me query active directory for names.
I can't use an LDAP query...
| |
by: mcgrew.michael |
last post by:
I hope this is the right group. I am very new to ASP so this is
probably a stupid question. I have some vbscript that query's AD and
populates a recordset. I know the recorset contains the information I
want by doing a Response.write. I am having problems dynamically
creating a drop down list from the data in the recordset. The drop down
is created but it is empty. Any help would be greatly appreciated. A
sample of the code:
<%
'On...
|
by: mart2006 |
last post by:
Hi,
I'm fairly new to PHP and I've created a dynamic drop down menu that populates itself with data from a MySQL table. What I would like to do is create a non dynamic drop down menu that alters what is shown in the dynamic menu.
For example, the first menu has three cities London, Paris, New York. If I choose London it populates the second menu with people from London.
Here is the code I have for my dynamic menu
<td...
|
by: happyman992 |
last post by:
Hi,
I have 2 questions. First, I am building a form with multiple drop down boxes. The options of the second drop down box will depend on what the user chooses on the first, options of the third drop down box depend on what they choose on the second, etc. The values of each option are inside a database which I can query for and put into a php array. I am wondering what is the easiest way to build this.
Second, when this form is...
|
by: audreyality |
last post by:
I am new to javascript and appreciate any guidance on this issue, so thank you in advance for your advice!
Situation:
I am working with a form that will send information to a database. I need the following:
A drop-down box of options that onChange=...
Opens another drop-down box of unique options that onChange=...
Displays text dependent on which option you chose.
An example:
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |