Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I need  onchange equivalent of Select Tag in PHP

Posted on 2008-06-24
6
Medium Priority
?
404 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

650 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