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.
Inserting into MySQL Newbie
Hi ive got a slight problem where ive made a simple web form where the customer inserts the ammount of tickets and then enters their personal details... then this form does the post method and it then
Menu restriction
How can I restrict the individual menu that would appear when a user logs in so that all users are confined to the transactions for which they have authorizations only as this also helps at a glance
Streaming local file from PHP while it’s been written to by a CURL process
I am creating a simple Proxy server for my website. Why I am not using mod_proxy and mod_cache is a different discussion. Here's the code: shell_exec("nohup curl --create-dirs -o {$write_path}
Grouping and sorting results
Please help with this query.I have 2 tables in a database, countires and cities. states looks like thiscountriesid -----------country1 ------------uk2 ------------us3 ------------japancitiesid
help me, how to find text on an external html site using PHP
Would anyone know how to search an external html file for a work or phrase ?I was thinking something like this --I use script cURL...Code: <?phpif (isset($_POST['submitted'])) { $xurl_1 =
Help With editting and deleting form
So look at this image :http://img194.imageshack.us/img194/8272/snapshot5f.png This table prints the titles of entries from a table in a database.. The code that i use for this table is this :Code:
Word filter problem
Hello,im trying to make a filter for words inputted in to my website but i want to store the swear word and the replacement for that word in a mysql db i have developed the code
header redirect problems? please help
Ok i am making a site that generates youtube thumbnails and i am generating an image that displays 1 image with a playbutton image on top of ithere is the page that generates the
Parse Error
Hi Guys,I have a function in my class which returns a string link variable. The problem is it keeps giving me a parse error. See code below followed by error message:Code: function
Echoing If Function?
A script I am using has If statements in the comments form to basically tell the form what to do. Currently the form works by opening in a pop up for those who want to read/write comments. I'm