473,395 Members | 1,694 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,395 software developers and data experts.

Simple - UD Function with Select / Option

Hello,
As you might guess I am completely new to this language. Maybe I get some
help here.
I try to execute a user defined funciton from a select option in a document
to read a file
into an array without using a submit button or anything else.
like this:
<select name="sel[]" onchange="<?php ReadFile(DependingOnValue);<?" >
<option value="1"> 1st Quarter </option>
<option value="2"> 2nd Quarter </option>
<option value="3"> 3rd Quarter </option>
</select>

I know I could use Javascript instead. But I am sure there is an easy way
doing in PHP.

Many thanks for your help

Michael

Jul 17 '05 #1
1 3415
On Mon, 26 Jan 2004 23:51:17 +0100, "Michael Hoffmann"
<mi*****@steinefrenz.net> wrote:
As you might guess I am completely new to this language. Maybe I get some
help here.
I try to execute a user defined funciton from a select option in a document
to read a file
into an array without using a submit button or anything else.
like this:
<select name="sel[]" onchange="<?php ReadFile(DependingOnValue);<?" >
<option value="1"> 1st Quarter </option>
<option value="2"> 2nd Quarter </option>
<option value="3"> 3rd Quarter </option>
</select>

I know I could use Javascript instead. But I am sure there is an easy way
doing in PHP.


You're wrong. PHP only executes on the server, when the form is submitted,
i.e. there is a request to the server. onChange is a client-side event that
does not cause a request, unless you use JavaScript to submit the form.

--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool
<http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: middletree | last post by:
Trying to build a dropdown from the values in an Access database, but can't get past this error. Should be easy, but I can't make it work. First, the code: 1. <select name="Gift1" id="Gift1">...
1
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two...
5
by: Christopher Benson-Manica | last post by:
I'm trying to dynamically change the contents of a select box by doing the following... function myfunc() { var obj=document.getElementById("objname"); // name of the select box var str='';...
3
by: Randi | last post by:
Hi, I am trying to write this program to get this shopping cart to work. I need to use the calc function to determine the option prices, using the selectedIndex property for each dropdown list. ...
13
by: LRW | last post by:
Having a problem getting a onSubmit function to work, to where it popsup a confirmation depending on which radiobutton is selected. Here's what I have: function checkdel() { if...
7
by: Ivan Marsh | last post by:
Hey Folks, I'm having a heck of a time wrapping mind around AJAX. Anyone know of a simple, straight-forward example for pulling a simple query from mysql with PHP using AJAX? As I...
24
by: firstcustomer | last post by:
Hi, Firstly, I know NOTHING about Javascript I'm afraid, so I'm hoping that someone will be able to point me to a ready-made solution to my problem! A friend of mine (honest!) is wanting to...
2
by: .nLL | last post by:
got below script, works fine with IE but fails on opera. my js knowledge is very limited and can't find whats wrong with it. ---------------------------------------------- function...
0
rnd me
by: rnd me | last post by:
Purpose: Allows you to create "presets" for text form inputs. "Lightweight and simple to setup, it adds a lot of convenience for ~1kb of code." Only one function, two parameters: First...
6
by: oneadvent | last post by:
This code works in Chrome and pulls a second drop down, but it will not work in IE6, (I dont have IE7/8 to check right now, but can later) and it works in FF, in IE it doesn't do anything at all. ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
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...

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.