PHP Classes

multi-form pages processing

Recommend this page to a friend!

      PHP Ajax  >  All threads  >  multi-form pages processing  >  (Un) Subscribe thread alerts  
Subject:multi-form pages processing
Summary:Have you got any solutions, to multi-form pages processing?
Messages:2
Author:MP
Date:2008-02-18 08:54:58
Update:2008-02-29 13:53:11
 

  1. multi-form pages processing   Reply   Report abuse  
Picture of MP MP - 2008-02-18 08:54:58
Hi.

Have you got any solutions, to multi-form pages processing?
Or I have to use JavaScript to identify which form sent data?

eg. my multi-form:

<body>

<input type="hidden" name="ID" id="ID" value="1" />
<input type="hidden" name="mainCount" id="mainCount" value="1" />
<input type="button" value="Send" onmouseup="classMain()" />

<input type="hidden" name="ID" id="ID" value="2" />
<input type="hidden" name="mainCount" id="mainCount" value="1" />
<input type="button" value="Send" onmouseup="classMain()" />

<input type="hidden" name="ID" id="ID" value="3" />
<input type="hidden" name="mainCount" id="mainCount" value="1" />
<input type="button" value="Send" onmouseup="classMain()" />

</body>

Thanks a lot!
I am looking forward for answer!

  2. Re: multi-form pages processing   Reply   Report abuse  
Picture of MP MP - 2008-02-29 13:53:11 - In reply to message 1 from MP
I have got this solution only, yet...

...........................................
<?php

require("phpajax/phpajax.php");

class example1 extends phpajax {
function input() {
aread("hidden1");
aread("hidden2");
}
function main() {
$a = & $this->hidden1;
$b = & $this->hidden2;
//---------------------------
aprint('output1', $a.'|'.$b);
ahide("ashow");
}
}


/* Initiliaze php ajax*/
phpajax::init();

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Example of how to implement multi-form pages processing in PHP Ajax</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php phpajax_js("phpajax/");?>
</head>
<body>

<!-- ____From these imputs I will receive data in phpajax____ -->
<input type="hidden" name="hidden1" id="hidden1"><br/>
<input type="hidden" name="hidden2" id="hidden2"><br/>

<!-- __________form1__________ -->
<input type="text" name="input1" id="input1"><br/>
<input type="text" name="input2" id="input2"><br/>
<input type="button" value="click me"
onmousedown="
document.getElementById('hidden1').value=document.getElementById('input1').value;
document.getElementById('hidden2').value=document.getElementById('input2').value;
"
onmouseup="example1()"
>
<br />

<!-- __________form2__________ -->
<input type="text" name="input3" id="input3"><br/>
<input type="text" name="input4" id="input4"><br/>
<input type="button" value="click me"
onmousedown="
document.getElementById('hidden1').value=document.getElementById('input3').value;
document.getElementById('hidden2').value=document.getElementById('input4').value;
"
onmouseup="example1()"
>
<br />

<!-- __________output__________ -->
result = <span id="output1"></span><br/>
</body>
</html>
................................................


Can it do better? I hope that yes :)

Greeting blackmoor...