| | |
listbox prob........
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Nov 2007
Posts: 183
Reputation:
Solved Threads: 5
PHP Syntax (Toggle Plain Text)
<html> <head> <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT"> <!-- function view(ss) { if(ss.options[ss.selectedIndex].value!='') { var a=document.getElementById('IndustryType'); var temp=a.value; var b='<?php echo $id; ?>'; parent.frameright.location = "http://www.web.com/webd.php?var=" + temp + "&vars=" + b; } } --> </script> </head> <body> $id=$_GET('id'); $hostname = "localhost"; $username = "car"; $password = "try"; $dbid = "car"; $link=mysql_connect($hostname, $username, $password); mysql_select_db($dbid) or die("unable to connect"); $result=mysql_query("select * from jop where owns='$id' and chkshare='yes'"); $sel ='<tr><td align="center" bgcolor="#EBEBEB"><select name="IndustryType" language="javascript" onchange="view(this);" size="12" style="width: 300px">'; $i = 0; while ($row = mysql_fetch_row($result)) { if ($i == 0) { $value = 'SELECTED value="' . $row[0] . '"'; } else { $value = 'value="' . $row[0] . '"'; } $sel .= '<option ' . $value . '>' . $row[1] . '</option>'; $i++; } $sel .= '</select></td></tr>'; print $sel; ?> </form> </body> </html>
•
•
Join Date: May 2005
Posts: 514
Reputation:
Solved Threads: 19
Well your main problem here is trying to use javascript + php natively like this with frames.
I would look to convert this to ajax as it is much more flexible. Sort of middle ground for client vs. server side.
I would look to convert this to ajax as it is much more flexible. Sort of middle ground for client vs. server side.
![]() |
Other Threads in the PHP Forum
- Previous Thread: shopping cart in php
- Next Thread: need help!!
| Thread Tools | Search this Thread |
# 5.2.10 alexa apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date directory display dissertation dropdown dynamic echo echo$_get[x]changingitintovariable... email encode error fairness file files folder form forms function functions google href htaccess html image images include indentedsubcategory insert ip javascript joomla legislation limit link local login mail memberships menu mlm multiple multipletables mysql mysqlquery newsletters oop open paypal pdf persist php problem provider query radio random recursion remote rss script search server sessions sms sockets source space spam sql syntax system table tutorial update upload url validator variable video web youtube





