kuteinheart 0 Light Poster

hi,

I have a varible which i want to pass it to an AKAX function as a parameter... HOW DO I DO IT????

Here is my code:

<?php
$Username=$_GET['Username'];

blah blah blah

echo "<select name=WD value=' ' onChange=showDetails(this.value, '$Username')>Date</option>";




/* The onchange function is as follows*/

function showDetails(FinishedDate, Username)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  }
var url="getme1.php";
url=url+"?Username="+Username+"&FinishedDate="+FinishedDate+"";
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

The function is not getting executed....:sweat:

Thank you...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.