PDA

View Full Version : javascript appending php variables



awakener1986
01-28-2010, 10:14 AM
hi i hope sum1 could help me with this. i suspect that the syntax is wrong.
im receiving an error message which says :

invalid regular expression flag z


<?php

$location = '/jcollect_affin/z/Impairment/_viewrule.php?phplens_kbruleIMPAIRMENT=filterview&num=6&lensFF_RULE_DOMCODE=RL&lensFF_RULE_DOMCODE_Exact=1&lensFF_RULE_CATEGORY=BDFS&lensFF_RULE_CATEGORY_Exact=1&lensFF_RULE_VERSION=1&lensFF_RULE_VERSION_Exact=1&_in_=';

?>

<td>
<select name="samp_anal_tables" onchange="document.location='.$location.'+\'&samp_anal_tables=\'+this.value;">
<option value=""></option>
<option value="anal">Analysis</option>
<option value="samp">Sample</option>
</select>
</td>

hope sum1 can help me with this.

Nile
01-28-2010, 10:47 PM
Try:


<td>
<select name="samp_anal_tables" onchange="document.location='<?php echo $location; ?>'+\'&samp_anal_tables=\'+this.value;">
<option value=""></option>
<option value="anal">Analysis</option>
<option value="samp">Sample</option>
</select>
</td>