I have a php page which has some checkboxes ,textfields and values.If I select a checkbox ,a particular value will be displayed in a textfield.I have a "go"button in the same page.I want the selected values and textfields to be displayed in the next page if i click the button.Pl guide me how to do this.
I am sending the sample code below.
arical.php
[HTML]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="ajax.js"></script>
<title>Untitl ed Document</title>
<style type="text/css">
[/HTML]
Expand|Select|Wrap|Line Numbers
- body{
- background-repeat:no-repeat;
- font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;
- font-size:0.9em;
- line-height:130%;
- text-align:center;
- height:100%;
- background-color: #E2EBED;
- }
- #contentContainer h2{ /* No margins above <h2> tags */
- margin-top:0px;
- }
- #mainContainer{
- width:99%;
- margin:0 auto;
- text-align:left;
- padding:5px;
- margin-top:20px;
- border:1px solid #000;
- background-color: #FFF;
- }
- #contentContainer{
- float:left;
- border:1px solid #000;
- background-color: #E2EBED;
- overflow:auto;
- margin-right:10px;
- padding:10px;
- /* CSS HACK */
- width: 750px; /* IE 5.x */
- width/* */:/**/760px; /* Other browsers */
- width: /**/760px;
- /* CSS HACK */
- height: 750px; /* IE 5.x */
- height/* */:/**/750px; /* Other browsers */
- height: /**/750px;
- }
- #contentContainer .openingText{
- color:red;
- }
- #articleListContainer{ /* <ul> container for article list */
- float:left;
- height:100%;
- overflow:auto;
- width:150px;
- border:1px solid #000;
- background-color:#CC9900;
- }
- .articleList{
- margin:0px;
- padding:5px;
- }
- .articleList li{ /* General layout article in list */
- list-style-type:none;
- border:1px solid #999;
- background-color:#EEE;
- height:100%;
- margin:2px;
- padding:2px;
- color:#333;
- cursor:pointer;
- }
- .articleList li.articleMouseOver{ /* Mouse over article in list - layout */
- border:1px solid #000;
- color:#000;
- }
- .articleList li.articleClick{ /* Active article in list - layout */
- border:1px solid #000;
- color:#000;
- background-color:#317082;
- /*color:#FFF;*/
- color:#0033CC;
- }
- .keyText{ /* Just a column I use for key text inside articles - the one with the light blue bg and dotted border */
- background-color:#FFF;
- border:1px dotted #000;
- float:right;
- margin-top:5px;
- margin-left:5px;
- margin-bottom:5px;
- width:150px;
- padding:3px
- }
- .clear{
- clear:both;
- }
<script type="text/javascript">
[/HTML]
Expand|Select|Wrap|Line Numbers
- /************************************************************************************************************
- Ajax dynamic articles
- Copyright (C) 2006 DTHMLGoodies.com, Alf Magne Kalleland
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Dhtmlgoodies.com., hereby disclaims all copyright interest in this script
- written by Alf Magne Kalleland.
- Alf Magne Kalleland, 2006
- Owner of DHTMLgoodies.com
- ************************************************************************************************************/
- var ajax = new sack();
- var articleListObj;
- var activeArticle = false;
- var clickedArticle = false;
- var contentObj // Reference to article content <div>
- function mouseoverArticle() // Highlight article
- {
- if(this==clickedArticle)return;
- if(activeArticle && activeArticle!=this){
- if(activeArticle==clickedArticle)
- activeArticle.className='articleClick';
- else
- activeArticle.className='';
- }
- this.className='articleMouseOver';
- activeArticle = this; // Storing reference to this article
- }
- function showContent() // Displaying content in the content <div>
- {
- contentObj.innerHTML = ajax.response; // ajax.response is a variable that contains the content of the external file
- }
- function showWaitMessage()
- {
- contentObj.innerHTML = 'Finding article.....<br>Please wait';
- }
- function getAjaxFile(fileName)
- {
- ajax.requestFile = fileName; // Specifying which file to get
- ajax.onCompletion = showContent; // Specify function that will be executed after file has been found
- ajax.onLoading = showWaitMessage; // Action when AJAX is loading the file
- ajax.runAJAX(); // Execute AJAX function
- }
- function selectArticle() // User have clicked on an article
- {
- getAjaxFile(this.id + '.html'); // Calling the getAjasFile function. argument to the function is id of this <li> + '.html', example "article1.html"
- if(clickedArticle && clickedArticle!=this)clickedArticle.className='articleMouseOver';
- this.className='articleClick';
- clickedArticle = this;
- }
- function initAjaxDemo()
- {
- articleListObj = document.getElementById('articleList');
- var articles = articleListObj.getElementsByTagName('LI');
- for(var no=0;no<articles.length;no++){
- articles[no].onmouseover = mouseoverArticle;
- articles[no].onclick = selectArticle;
- }
- contentObj = document.getElementById('contentContainer');
- }
- window.onload = initAjaxDemo;
- function check()
- {
- <!-- Code for entering the values into the form by checking the boxes -->
- if (document.sangoma.chkownDomain.checked) {
- document.sangoma.ownDomain.value = "50";
- }
- else {
- document.sangoma.ownDomain.value = "0";
- }
- }
- function check1()
- {
- <!-- Code for entering the values into the form by checking the boxes -->
- if (document.sangoma.chkownDomain1.checked) {
- document.sangoma.ownDomain1.value = "500";
- }
- else {
- document.sangoma.ownDomain1.value = "0";
- }
- }
- <!-- End of check box code -->
- function sum()
- {
- var a=parseInt(document.sangoma.ownDomain.value);
- var b=parseInt(document.sangoma.ownDomain1.value);
- document.sangoma.total.value=a+b;
- }
- function check_1()
- {
- <!-- Code for entering the values into the form by checking the boxes -->
- if (document.sangoma.chkownDomain_1.checked) {
- document.sangoma.ownDomain_1.value = "7897";
- }
- else {
- document.sangoma.ownDomain_1.value = "0";
- }
- }
- function check_2()
- {
- <!-- Code for entering the values into the form by checking the boxes -->
- if (document.sangoma.chkownDomain_2.checked) {
- document.sangoma.ownDomain_2.value = "6768";
- }
- else {
- document.sangoma.ownDomain_2.value = "0";
- }
- }
- <!-- End of check box code -->
- function sum_tot()
- {
- var a1=parseInt(document.sangoma.ownDomain_1.value);
- var b1=parseInt(document.sangoma.ownDomain_2.value);
- document.sangoma.total.value=a1+b1;
- }
[HTML]</script>
</head>
<body>
<form action="" method="post" name="sangoma">
<div id="contentCont ainer">
<h2 class="openingT ext">Click on one of the Snagoma Card to the right.</h2>
<p>This will load the the content of external articles into this DIV</p>
</div>
<div id="articleList Container">
<ul id="articleList " class="articleL ist">
<li id="article1">A 200 FXO ONLY analog cards</li>
<li id="article2">A 200 FXS ONLY analog cards</li>
<li id="article3">A 200FXO & FXS analog cards</li>
<li id="article4">A 400 FXO ONLY analog cards</li>
<li id="article5">A 400 FXS ONLY analog cards</li>
<li id="sam">A400 FXO & FXS analog cards</li>
<li id="test">Sango ma Technologies</li>
<li id="article8">A 200 Sangoma FXO/FXS Component Based Pricing starting Jan 1 2007</li>
<li id="article9">A 400 Sangoma FXO/FXS Component Based Pricing</li>
</ul>
</div>
<div class="clear"></div>
</form>
</body>
</html>
[/HTML]
article1a.html
[HTML]<form action="" method="post" name="sangoma">
<!--<form method="post" action="article 1.html" name="autoSumFo rm" >-->
<table><th>&nbs p; </th>
<th>SKU #</th>
<tr>   ; <td align="left">A2 0001</td> <td align="right">2 FXO analog card</td></tr>
<tr>   ; <td align="left">A2 0001D</td> <td align="right">2 FXO analog card w/ EC HW</td></tr>
</table>
</form>
[/HTML]
Thanks in advance.
------