473,387 Members | 1,534 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.

Load duplicate page with same data?

I have a webpage where the user fills out fields and then clicks on Submit, which writes all the information to a MySQL database using Ajax and then continues to another page where they can see the information they just sumbitted and then click on PayPal button to make payment. My question is two part: Using Javascript, can I reload the exact same page in the same format with all the same information but in read-only instead of input and with a PayPal button instead of the Submit Button and how is the best way to go about this OR can I have the page change the Submit Button to the PayPal button using Javascript and leave the rest of the page alone or even change all the input fields to read only? I am teaching myself most of what I am writing in these web pages, so I have a lot to learn.
Jun 23 '10 #1
1 1513
gits
5,390 Expert Mod 4TB
after the successful execution of the AJAX-call you might set the readonly attribute to the input nodes and remove/hide the submit button while adding/unhide the paypal buton ... you just need to retrieve the corresponding DOM-nodes with:

Expand|Select|Wrap|Line Numbers
  1. document.getElementById('theId').readonly = 'readonly';
for example. or set the disabled attribute in this way. to hide something you might use a similar call:
Expand|Select|Wrap|Line Numbers
  1. document.getElementById('theId').style.display = 'none';
kind regards
Jun 24 '10 #2

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

Similar topics

5
by: Barry Margolin | last post by:
The online banking site I use has autofill=no set in their login form, and I recently switched from IE to Safari, which honors this. I'd like my account number to be filled in automatically like...
1
by: Fredrik Melin | last post by:
Using Framwork 2.0 Im trying to load a page through reflection (To allow developers at the cutomer to override a single page without us knowing it in a precompiled site) This code works fine ...
2
by: imam888 | last post by:
How do I load "varchar for bit" data in hexadecimal format into a DB2 table ? Table definition =========== create table test ( i integer, v varchar for bit data (16)) db2 "IMPORT FROM...
3
by: ajaspersonal | last post by:
"i want to change font_style (hyper link<a href...>text</a>) normal to italics.when load a page" this is my problem but that label included in one 'USERCONTROL' This user controls may...
2
by: Harry Haller | last post by:
I want to duplicate the form data, edit it to remove some items (such as __EVENTTARGET, __EVENTVALIDATION, etc) and save it to a log. How can I make a duplicate (editable) copy of the Form...
3
by: Subrat Das | last post by:
Hi, I have a java application which calls a stored procedure to insert data into a table.Multiple threads of java call the same procedure at the same time. Sometimes it happens that few threads send...
1
by: cookspyder | last post by:
To give an overview of what im trying to do I will first explain what I am using. I have a Jahia based site supporting dashboards on port 80 and php support on port 88 on the same win 2003 server...
19
by: Zytan | last post by:
I want multiple instances of the same .exe to run and share the same data. I know they all can access the same file at the same time, no problem, but I'd like to have this data in RAM, which they...
2
by: sindhu | last post by:
Hello, I'm loading a frame from another frame using anchor tag. the code is as folllows. function change_page { if(document.form.txtbx1.value=="all") { ...
7
by: meodanang | last post by:
I am currently working on a website project. The sites are loaded into a <div> by using ajax. Everything was working well until I tried to load a page into a <div> with some sort of javascript code...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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,...

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.