Results 1 to 2 of 2

Thread: javascript appending php variables

  1. #1
    Join Date
    Jan 2010
    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default javascript appending php variables

    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.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Try:
    Code:
    <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>
    Jeremy | jfein.net

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •