473,602 Members | 2,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

selected items to be displayed in the next page/form

15 New Member
Hi,

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
  1. body{
  2.     background-repeat:no-repeat;
  3.     font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;
  4.     font-size:0.9em;
  5.     line-height:130%;
  6.     text-align:center;
  7.     height:100%;
  8.     background-color: #E2EBED;
  9. }
  10. #contentContainer h2{    /* No margins above <h2> tags */
  11.     margin-top:0px;
  12. }
  13.  
  14.  
  15. #mainContainer{
  16.     width:99%;
  17.     margin:0 auto;
  18.     text-align:left;
  19.     padding:5px;
  20.     margin-top:20px;
  21.     border:1px solid #000;
  22.     background-color: #FFF;
  23. }
  24. #contentContainer{
  25.  
  26.     float:left;
  27.     border:1px solid #000;
  28.     background-color: #E2EBED;
  29.     overflow:auto;
  30.     margin-right:10px;
  31.     padding:10px;
  32.  
  33.     /* CSS HACK */
  34.     width: 750px;    /* IE 5.x */
  35.     width/* */:/**/760px;    /* Other browsers */
  36.     width: /**/760px;
  37.  
  38.     /* CSS HACK */
  39.     height: 750px;    /* IE 5.x */
  40.     height/* */:/**/750px;    /* Other browsers */
  41.     height: /**/750px;
  42.  
  43. }
  44.  
  45.  
  46. #contentContainer .openingText{
  47.     color:red;
  48. }
  49.  
  50. #articleListContainer{    /* <ul> container for article list */
  51.     float:left;
  52.     height:100%;
  53.     overflow:auto;    
  54.     width:150px;
  55.     border:1px solid #000;
  56.     background-color:#CC9900;    
  57. }
  58. .articleList{
  59.     margin:0px;
  60.     padding:5px;
  61.  
  62. }
  63. .articleList li{    /* General layout article in list */
  64.     list-style-type:none;
  65.     border:1px solid #999;
  66.     background-color:#EEE;
  67.     height:100%;
  68.     margin:2px;
  69.     padding:2px;
  70.     color:#333;
  71.     cursor:pointer;
  72. }
  73. .articleList li.articleMouseOver{    /* Mouse over article in list - layout */
  74.     border:1px solid #000;
  75.     color:#000;
  76. }
  77. .articleList li.articleClick{    /* Active article in list - layout */
  78.     border:1px solid #000;
  79.     color:#000;
  80.     background-color:#317082;
  81.     /*color:#FFF;*/
  82.     color:#0033CC;
  83. }
  84.  
  85. .keyText{    /* Just a column I use for key text inside articles - the one with the light blue bg and dotted border */
  86.     background-color:#FFF;
  87.     border:1px dotted #000;
  88.     float:right;
  89.     margin-top:5px;
  90.     margin-left:5px;
  91.     margin-bottom:5px;
  92.     width:150px;
  93.     padding:3px
  94. }
  95. .clear{
  96.     clear:both;
  97. }
[HTML]</style>

<script type="text/javascript">
[/HTML]
Expand|Select|Wrap|Line Numbers
  1. /************************************************************************************************************
  2. Ajax dynamic articles 
  3. Copyright (C) 2006  DTHMLGoodies.com, Alf Magne Kalleland
  4.  
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public
  7. License as published by the Free Software Foundation; either
  8. version 2.1 of the License, or (at your option) any later version.
  9.  
  10. This library is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  13. Lesser General Public License for more details.
  14.  
  15. You should have received a copy of the GNU Lesser General Public
  16. License along with this library; if not, write to the Free Software
  17. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  18.  
  19. Dhtmlgoodies.com., hereby disclaims all copyright interest in this script
  20. written by Alf Magne Kalleland.
  21.  
  22. Alf Magne Kalleland, 2006
  23. Owner of DHTMLgoodies.com
  24.  
  25.  
  26. ************************************************************************************************************/    
  27. var ajax = new sack();
  28. var articleListObj;
  29. var activeArticle = false;
  30. var clickedArticle = false;
  31. var contentObj    // Reference to article content <div>
  32.  
  33. function mouseoverArticle()    // Highlight article
  34. {
  35.     if(this==clickedArticle)return;
  36.     if(activeArticle && activeArticle!=this){
  37.         if(activeArticle==clickedArticle)
  38.             activeArticle.className='articleClick';
  39.         else
  40.             activeArticle.className='';
  41.  
  42.     }
  43.     this.className='articleMouseOver';
  44.     activeArticle = this;    // Storing reference to this article
  45. }
  46.  
  47. function showContent()    // Displaying content in the content <div>
  48. {
  49.     contentObj.innerHTML = ajax.response;    // ajax.response is a variable that contains the content of the external file    
  50. }
  51.  
  52. function showWaitMessage()
  53. {
  54.     contentObj.innerHTML = 'Finding article.....<br>Please wait';
  55. }
  56. function getAjaxFile(fileName)
  57. {
  58.     ajax.requestFile = fileName;    // Specifying which file to get
  59.     ajax.onCompletion = showContent;    // Specify function that will be executed after file has been found
  60.     ajax.onLoading = showWaitMessage;    // Action when AJAX is loading the file
  61.     ajax.runAJAX();        // Execute AJAX function    
  62. }
  63.  
  64. function selectArticle()    // User have clicked on an article
  65. {
  66.     getAjaxFile(this.id + '.html');    // Calling the getAjasFile function. argument to the function is id of this <li> + '.html', example "article1.html"
  67.     if(clickedArticle && clickedArticle!=this)clickedArticle.className='articleMouseOver';
  68.     this.className='articleClick';
  69.     clickedArticle = this;
  70. }
  71.  
  72.  
  73.  
  74.  
  75. function initAjaxDemo()
  76. {
  77.     articleListObj = document.getElementById('articleList');
  78.     var articles = articleListObj.getElementsByTagName('LI');
  79.     for(var no=0;no<articles.length;no++){
  80.         articles[no].onmouseover = mouseoverArticle;
  81.         articles[no].onclick = selectArticle;
  82.     }    
  83.  
  84.     contentObj = document.getElementById('contentContainer');
  85. }
  86. window.onload = initAjaxDemo;
  87.  
  88.  
  89. function check()
  90. {
  91. <!-- Code for entering the values into the form by checking the boxes -->
  92. if (document.sangoma.chkownDomain.checked) {
  93. document.sangoma.ownDomain.value = "50";
  94. }
  95. else {
  96. document.sangoma.ownDomain.value = "0";
  97. }
  98. }
  99. function check1()
  100. {
  101. <!-- Code for entering the values into the form by checking the boxes -->
  102. if (document.sangoma.chkownDomain1.checked) {
  103. document.sangoma.ownDomain1.value = "500";
  104. }
  105. else {
  106. document.sangoma.ownDomain1.value = "0";
  107. }
  108. }
  109. <!-- End of check box code -->
  110. function sum()
  111. {
  112. var a=parseInt(document.sangoma.ownDomain.value);
  113. var b=parseInt(document.sangoma.ownDomain1.value);
  114. document.sangoma.total.value=a+b;
  115. }
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122. function check_1()
  123. {
  124. <!-- Code for entering the values into the form by checking the boxes -->
  125. if (document.sangoma.chkownDomain_1.checked) {
  126. document.sangoma.ownDomain_1.value = "7897";
  127. }
  128. else {
  129. document.sangoma.ownDomain_1.value = "0";
  130. }
  131. }
  132. function check_2()
  133. {
  134. <!-- Code for entering the values into the form by checking the boxes -->
  135. if (document.sangoma.chkownDomain_2.checked) {
  136. document.sangoma.ownDomain_2.value = "6768";
  137. }
  138. else {
  139. document.sangoma.ownDomain_2.value = "0";
  140. }
  141. }
  142. <!-- End of check box code -->
  143. function sum_tot()
  144. {
  145. var a1=parseInt(document.sangoma.ownDomain_1.value);
  146. var b1=parseInt(document.sangoma.ownDomain_2.value);
  147. document.sangoma.total.value=a1+b1;
  148. }


[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;&nbsp;&nbsp; </th>
<th>SKU #</th>
<tr>&nbsp;&nbsp ;&nbsp;<td align="left">A2 0001</td>&nbsp;&nbsp; &nbsp;<td align="right">2 FXO analog card</td></tr>

<tr>&nbsp;&nbsp ;&nbsp;<td align="left">A2 0001D</td>&nbsp;&nbsp; &nbsp;<td align="right">2 FXO analog card w/ EC HW</td></tr>


</table>
</form>
[/HTML]
Thanks in advance.

------
Jan 12 '08 #1
2 2001
acoder
16,027 Recognized Expert Moderator MVP
Please enclose your posted code in [code] tags (See How to Ask a Question).

This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.

Please use [code] tags in future.

MODERATOR
Jan 12 '08 #2
acoder
16,027 Recognized Expert Moderator MVP
If you need to display these values on the next page, you don't need Ajax. Just let PHP do the work of retrieving the submitted values.
Jan 12 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
4310
by: juststarter | last post by:
Hello, I have an aspx file where i've put a placeholder element. On load i create dynamically a table which contains a checkbox and a radiobuttonlist in each tablerow . The radiobuttonlist contains two items (yes,no). Both the checkboxes and the radiobuttonlist are NOT autopostbacked ( .autopostback = false). When i press the submit button a sub is run. My problem is that i can not get the selected items in the radiobuttonlists.This is...
2
2610
by: David | last post by:
Hi, I have an order form which has a field 'ProductID'. This form has a button on each record to open a new form linked by ProductID. This new form is a continuous form and obviously, only displays the records associated with that ProductID. Basically this is part of a Product Packing Pick System. From my products table, each product has a set default amount of items which
3
26284
by: Stephen Adam | last post by:
Hi there, I'm sure i'm missing something really simple here, all i want to do is get the value of the selected item in a list box. Even after much fiddling about last night I still could not get my code to work. Below is some code which highlights my problem. All I want to do is set the lable control's text property to the value of the selected drop down list value - in this example i've shown the three ways i've tried. Please help!
4
3992
by: juststarter | last post by:
Hello, I have an aspx file where i've put a placeholder element. On load (page_load) i create dynamically an html table which contains a checkbox and a radiobuttonlist in each tablerow . The radiobuttonlist contains two items (yes,no). Both the checkboxes and the radiobuttonlist are NOT autopostbacked ( .autopostback = false). When i press the submit button a sub (submit_pressed) is run. My problem is that i can not get the selected items...
2
2752
by: John | last post by:
I have a listbox that is databound when my form loads. A user can then select and option using a drop down box. When the user selects an option the corresponding items in the listbox gets selected. How can I show those selected items at the top of my listbox. The issue is when the user selects an item and it is in the middle of the list, the user is not able to know an item it is selected or not unless they scroll through the listbox.
1
10384
by: Ben | last post by:
I have a formview with a few dropdownlists (software version, database version, etc). When a software version is selected, the database version dropdownlist updates itself accordingly. When in edit mode, everything works fine - the selected value in each list defaults to the value from the database record (selectedvalue=bind...). However, in insert mode (insertitem), it is not working. I pass in a value on the query string that I would...
11
5798
by: Santosh | last post by:
Dear all , i am writting following code. if(Page.IsPostBack==false) { try { BindSectionDropDownlist();
0
1361
by: svgeorge | last post by:
I have web pages for making several 9 type of payments. The data gets loaded on web page from SQL server 2005 database. Then I have Process payment button(ProcPaymBTM_Click) on the web page(Detail View)This is done. on clicking this button(ProcPaymBTM_Click) on (Detail View) all selected (checked) data columns needs displayed on another page (Review Data) In this page i click confirm payment button to insert selected data to the SQL Tables. I...
0
3557
by: rehanmomin | last post by:
Just to start off, I am writing a web application using C#. I have a Menu which is binded to an XML datasource. There are three menu items each with submenus and a textbox where I want to display the value of the selected menu item. Heres the XML datasource that I am using: <?xml version="1.0" encoding="utf-8" ?> <Home> <Menu text="Patient" description=" "> <SubMenu text="First Name" description="firstName"></SubMenu> ...
0
7993
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8404
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8054
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8268
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5440
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2418
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1254
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.