Jump to content

dave007

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dave007's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I think this is a problem with sending two GET requests... I've managed to make the form update one of the <form name="VarForm" action="' . $_SERVER['PHP_SELF'] . '" method="GET"><select name = "v2p" size=5 OnChange="VarForm.submit();">'; but now the 'rec' variable is lost... please could someone save my hair from all being pulled out. Thanks
  2. I have xml files for a whole bunch of data. I have managed to get them into a nice format and showing on an html page fine. I can even go backwards and forwards between xml files. To do this I simply use a $_GET['rec'] variable. However, I've been trying to ALSO have things update on the page when the user selects (preferably just clicks on) an item in a <select> tag - populated from the XML file. Below is my latest attempt at this (with the population of the <select>): echo "<form id=v2p method=\"POST\"><select size = 5 onclick=\"javascript:document.v2p.submit();return false;\">"; $vars = $xmlDoc->getElementsByTagName('var'); foreach($vars as $var) { $varname = $var->getElementsByTagName('vaname')->item(0)->nodeValue; echo "<option value=$varname>$varname</option>"; } echo "</select></form>"; echo "<br/>"; $var2plot = $_POST['v2p']; echo "<a>$var2plot</a>"; I get an "Undefined index: v2p" error on line 75 ($var2plot = $_POST['v2p']; ): Please could someone show me a nice way to make it work... Thanks in advance, Dave
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.