By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,119 Members | 2,064 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,119 IT Pros & Developers. It's quick & easy.

Simple - UD Function with Select / Option

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.