i have created a form with 2 drop-down list and a submit button. I would like to know how to pass the selected values from the two drop down list to external javascript file and only will pass it after i clicked the submit button? Below is the example of my code:
<html>
<head>
<script type="text/javascript" src="selecttidmth.js"></script>
<title>Report</title>
</head>
<body>
<form action="getID.php" method="get">
Magazines:
<select name="tid" onchange="showTid(this.value)">
<option value="">---Select---</option>
<option value="1">Magazine A</option>
<option value="2">Magazine B</option>
</select>
Month:
<select name="mth" onchange="showMonth(this.value)">
<option value="">---Select---</option>
<option value="Jan">January</option>
<option value="Feb">February</option>
<option value="Mar">March</option>
<option value="Apr">April</option>
<option value="May">May</option>
<option value="Jun">June</option>
<option value="Jul">July</option>
<option value="Aug">August</option>
<option value="Sept">September</option>
<option value="Oct">October</option>
<option value="Nov">November</option>
<option value="Dec">December</option>
</select>
<input type="submit" name="submit" Value="Submit">
</form>
<div id="txtHint"></div>
</body>
</html>
//javascript code
var xmlhttp;
function showTid(str)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
{
alert ("Browser does not support HTTP Request");
return;
}
function showMonth(str2)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
{
alert ("Browser does not support HTTP Request");
return;
}
var url="getID.php";
url=url+"?q="+str+"?m="+str2;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}
Hope someone here can help me out. Thanks in advance.
Ajax Error since Upgrading to 3.5
Ever since upgrading my site to .NET 3.5 (I needed LINQ), I've been getting this annoying error on one of my pages:
query based on 2 conditions
I want to select if the doc_type is either s OR f but this doesn't work:Code: [Select]$query2 = "SELECT * FROM members WHERE doc_type='s' && doc_type= 'f' ORDER BY
writing a screen scraper
Hello,I'm writing a screen scraper application and want to be able to get absolute addresses for images from relative links.So a link like this: Code: <img
Need help with simple code, back and forward buttons.
Basically, I have a set of pages in a folder, which have the title somephrasehere_09.php, somephrasehere_10.php, somephrasehere_11.php, etc. On each of these pages, I want to include a common code
New to mysqli library - Multiple query problem
Greetings,I am writing a batch program that executes 3 queries on a single page. Using mysql libraries and regular queries works just fine. I am rewriting the page to include a stored procedure. The
images aren't rendering
I'm trying to call a JPG file from within PHP (in an effort to hide the actual JPG folder). The image is supposed to be called at domain.com/photo/?id=X&i=Y where X is the gallery ID and Y is
Mysql error message
help me find out what this error message means:"Duplicate entry '0' for key 'PRIMARY'"the sql for it is Code: INSERT INTO accounts (firstname, lastname, username, password, joined, email,
mysql UNION | warning mysql_fetch_array !!
Code: <?php $i = 0; $query1="SELECT * FROM `products` WHERE `division`='$f_usr_div' ORDER BY `pname` UNION SELECT `stock_close` FROM `stockiest_entry` WHERE
What exactly is net neatrality?
What exactly is it? I think it's anti-censorship and... stuff... but I don't really understand it
xml element exists
Code: [Select]<?xml version="1.0"?><Addresses> <Address ID="1"> <Address2>101 MAIN ST</Address2>