| | |
creating a sticky form compatible with onChange
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2006
Posts: 82
Reputation:
Solved Threads: 0
Hi
I was using PHP sessions to create a sticky form but a
button was needed to reload the page.
I am new to Java and I have decided to do away with the button.
Using onChange="javascript:OnChange(this) to cause the
page to reload once a selection is made from a dynamic dropdown works.
The problem is the input box and other dropdown on the same page lose
their information. How can I create a sticky form that is
compatible with onChange?
Thanks
I was using PHP sessions to create a sticky form but a
button was needed to reload the page.
I am new to Java and I have decided to do away with the button.
Using onChange="javascript:OnChange(this) to cause the
page to reload once a selection is made from a dynamic dropdown works.
The problem is the input box and other dropdown on the same page lose
their information. How can I create a sticky form that is
compatible with onChange?
Thanks
PHP Syntax (Toggle Plain Text)
<? include("../priority_low_to_high_in.php");//proiority drop down ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Calendar</title> <link href="../config.css" rel="stylesheet" type="text/css"/> <script language="JavaScript" type="text/JavaScript"> <!-- function OnChange(dropdown) { window.location.href="http://localhost/search_form.php?pro_id=" + dropdown.options[dropdown.selectedIndex].value; } function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> <style type="text/css"> <!-- --> </style> </head> <!-----------------------form processor----------------------------> <form action="../search_process.php" name="calendar" method="post"> <tr> <td> <select name= "provider_id" onChange="javascript:OnChange(this);"> <? //display lastname and first name provider_first_last_name_display($name, $name_val, $db_id); ?> </select> </td> </tr> <tr> <td> <!---reason input----> <input type="text" name="reason" size="30" maxlength="60" value ="<?php echo $reason; ?>"> </td> </tr> <tr> <td> <!--priority dropdown--> <select name="priority"> <?php $priority_name = get_b_priority_name($b_priority_n); $priority_code = get_b_priority_code($b_priority_c); for($n = 1; $n<= 6; $n++) { $sname = $priority_name[$n]; $scode = $priority_code[$n]; echo "<option value = '$scode'"; if ($scode == " ") { echo "selected"; } echo "> $sname"; } ?> </select> </td> </tr> </body> </from> </html>
•
•
Join Date: Oct 2006
Posts: 82
Reputation:
Solved Threads: 0
Hi
Thanks for responding.
I will try the version of code you seggested
I did tried this before posting but the data was still lost:
Thanks for responding.
I will try the version of code you seggested
I did tried this before posting but the data was still lost:
PHP Syntax (Toggle Plain Text)
<? <input type="text" name="reason" size="30" maxlength="60" value="<?php if(! empty($_POST['reason'])){echo $_POST['reason'];} else {echo"$reason";}?>"> ?>
![]() |
Other Threads in the PHP Forum
- Previous Thread: Need help fast
- Next Thread: error in my login page
| Thread Tools | Search this Thread |
apache api array beginner beneath binary broadband broken button cakephp checkbox class cms code countingeverycharactersfromastring crack cron curl database date display dynamic echo email error fcc file files folder form forms freelancing function functions google href htaccess html image include incode insert integration ip javascript joomla limit link login mail match menu method mlm mod_rewrite multiple mysql oop pageing pagerank paypal pdf php problem query radio random recursion recursiveloop remote script search server sessions sms smtp soap source space sql strip_tags subversion support! survey syntax system table template tutorial undefined update upload url validator variable video virus web window.onbeforeunload=closeme; youtube






