?
Solved

I need  onchange equivalent of Select Tag in PHP

Posted on 2008-06-24
6
Medium Priority
?
394 Views
Last Modified: 2013-12-13
Hi,

  Can any one find the equivalent PHP code for this html select tag

  <select name="searchlist"  onchange="opt2txt(this)">

  Thanks :)
0
Comment
Question by:balajijoseph
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 2

Accepted Solution

by:
loki23 earned 80 total points
ID: 21855192
Since PHP is a server-side language, and doesn't directly monitor changes on the client-side, there is no PHP equivalent to that statement in PHP. The only way you may incorporate PHP into that statement is to leave it as it is and have the onchange function call an AJAX routine that triggers a php script
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 21857195
There is no "onchange equivalent" code in PHP instead of HTML ... you can rewrite it in php like this,


echo '<select name="searchlist"  onchange="opt2txt(this)">';

Open in new window

0
 
LVL 3

Expert Comment

by:Bivek-jos
ID: 21863194
Hi there,

Yes there is not equivalent code in php for onchange but you can use "AJAX" to call php functions for executing php codes
Google for "ajax"

Thanks
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 21863595
0

Featured Post

7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question