473,387 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Combine Various pages into a single one

Hi,

- I have 3 HTML files with javascript and PHP codes in each and each containing 8 questions for the user.
- I want to convert these 3 files into 1 file say test.
- That is when i first see the file on a browser i see the 8 questions, and when i press continue button action should go to test itself

- and the next 8 questions should be dislplayed.

However i am not sure where and what code to put where so that the right code is executed everytime and the right questions are shown.

Please help.
Mar 26 '08 #1
5 1287
acoder
16,027 Expert Mod 8TB
Are you submitting the page or do you want the next set of questions to show without reloading when the continue button is clicked?
Mar 27 '08 #2
Yeah i am submitting each form and storing the data using PHP session variables..
Mar 27 '08 #3
acoder
16,027 Expert Mod 8TB
This is then not a JavaScript question, so I'm moving this thread to the PHP forum. Set the action of the form to the same page. To determine which "page" you're at, use a hidden variable or a session variable.
Mar 31 '08 #4
dlite922
1,584 Expert 1GB
This is then not a JavaScript question, so I'm moving this thread to the PHP forum. Set the action of the form to the same page. To determine which "page" you're at, use a hidden variable or a session variable.
ALTHOUGH...it would be alot faster, better, more user friendly if it was actually done in JS.

If your questions are not DEPENDENT on each other. (ie you must answer questions 1 - 8, to build question 9 -16, etc), then put the set of questions in three div tags:
Expand|Select|Wrap|Line Numbers
  1. <div id="page1">first questions here</div>
  2. <div id="page2">second questions here</div>
  3. <div id="page3">third questions here</div>
  4.  
  5.  
  6. // then with javascript change their display property
  7.  
  8. // this for example, displays page 2
  9.  
  10. document.getElementById('page1').style.display = 'none'; 
  11. document.getElementById('page2').style.display = 'block'; 
  12. document.getElementById('page3').style.display = 'none'; 
  13.  
  14.  
I think you can figure out how to display the other two.

Good luck.
Mar 31 '08 #5
acoder
16,027 Expert Mod 8TB
ALTHOUGH...it would be alot faster, better, more user friendly if it was actually done in JS.
It would be, but with a form submit involved, unless it used Ajax, there's no JavaScript.
Mar 31 '08 #6

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

Similar topics

3
by: tom | last post by:
I have two seperate pages, one is my navigation and the other is my main page. How do I combine the two useing php, if you know please gimme a hand. thanks
3
by: mmccaws | last post by:
Thanks ahead for your help I'm trying to learn what I can do with echo and print statements. I figured out the echo statement and below is the simple version using print. I've tried two dozen...
11
by: David P. Jessup | last post by:
My current application I am working on consists of 3 separate ASP pages. I'm posting data to each other page and using request.form to retrieve. My first page has about 300 lines of code, the...
1
by: Ken Fine | last post by:
I want to take the contents of many fields of various datatypes (varchars and text) and combine them into a single "junk" field that I will perform SQL Server free text searching upon, e.g.: ...
1
by: mojo | last post by:
We have set up an Access database with tables x,y, & z where we would like to have multiple people entering data into a table x. Each person has an identical copy of the database on their PC's. ...
24
by: trint | last post by:
add them into one PrintDocument: PrintDocument pd1 = new PrintDocument(); PrintDocument pd2 = new PrintDocument(); PrintDocument pdCombined = new PrintDocument(); pdCombined = pd1 + pd2;...
1
by: David Lozzi | last post by:
Hello, I'm looking for the best option to combine two XMLDocuments into a single document. I'm using ASP.Net using VB. I have a function that returns a dataset in XML which works great if there...
5
by: jhutchings | last post by:
Hello everyone, I have a database where I collect shipment data from various tables. However, I have a problem. Whenever I want to see shipping data for orders that were set to ship on or before...
1
by: =?Utf-8?B?Sm9obg==?= | last post by:
Hi, I need to combine several bitmaps together to form a single bitmap. Can anyone show me some similar sample code? Thanks. AJ
1
by: bluereign | last post by:
Thank you for your assistance. I am a novice looking to JOIN and append or combine records from 2 current Tables into 2 new Tables named below. I have been able to JOIN Tables with the script...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.