need logic so when the page is refreshed that it returns to the location
of the change, not to the top of the page.
Currently, when the page is refreshed, it takes you back to the
beginning of thepage, not the area you may be working on.
What we need the page to do is when enter or tab is pressed and the
page refreshes, take you back to the exact spot on the page you were
at when you pressed enter.when each refresh form submition take place..couls any one plz help?is javascript s help?
I can think of at least two ways to do this:
1. You can create a named link, e.g. <a name="text1"> next to each text box, then the form action can be changed to "actionpage.cfm#text1", to jump to the position on the page. You can set this using JavaScript in the onchange.
2. Use a hidden field and change it onchange. When the form is submitted, you can write Coldfusion code to take the hidden field value which is the name of the text box which triggered the update and jump to that position.
Note: you don't need "javascript:" in an onchange, just the JavaScript code itself is sufficient.
Hope that helps. Let me know if you need help implementing this.
7 10469
You can use either JavaScript or plain HTML, though you could set it via Coldfusion.
Can I confirm one or two things though: is the refresh via a form submission? Is this triggered by pressing tab or enter?
Post some code, so it can be easier to suggest changes/additions.
we using " onchange="javascript:document.form.submit()" in onchange.What i wants is that when i changed somthing in text field thn form submition took place.
a lot of controls in the form.large form..so when a change somthing in textbox then after submition the control will come to tht changed posion.not the focus in tht form control..just show the postion
<input name="text1" type="text" value="#text1#" id="text1" size="15" maxlength="13" onchange="javascript:document.form.submit()"/>
I can think of at least two ways to do this:
1. You can create a named link, e.g. <a name="text1"> next to each text box, then the form action can be changed to "actionpage.cfm#text1", to jump to the position on the page. You can set this using JavaScript in the onchange.
2. Use a hidden field and change it onchange. When the form is submitted, you can write Coldfusion code to take the hidden field value which is the name of the text box which triggered the update and jump to that position.
Note: you don't need "javascript:" in an onchange, just the JavaScript code itself is sufficient.
Hope that helps. Let me know if you need help implementing this.
OK thanks............working hidden field logic
Do you mean you've got it working or you're going to work with the hidden field option?
I mean it's working now ...sory 4 vauge communication
No problem, glad to hear that you've got it working.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: gsb |
last post by:
HOW TO: Submit a form to PHP with no return?
I need to submit a form for file upload to a PHP script but do not want
anything returned.
That is the TARGET for the form should be like a null...
|
by: Don |
last post by:
I want the server-side php script to return a browser page that is essentially a copy of the
original client page that contained the <form> which referenced the php script in the first place....
|
by: Glenn Mulno |
last post by:
Hi,
I am trying to create a report page for several teams. Each team runs the
same reports but the reports use different values.
For a while this was getting insane everytime I updated the...
|
by: fig000 |
last post by:
Hi,
I'm relatively new to Javascript so please bear with me on what
might sound like silly questions.
This is what I want to do:
I'm working in classic asp (I have to for this project). I...
|
by: Al |
last post by:
Hi all...
I have created an aspx page that contains an animated GIF. I am using
javascript and location.replace to redirect from this page to another aspx
page which takes several seconds to...
|
by: kurtj |
last post by:
Hello Gurus:
I have a validation script (below) that is somehow messed up. If the
Name field is blank, I get the alert message, then the browser window
goes to a blank document with the word...
|
by: d3vkit |
last post by:
I have a form on my page, and some javascript which uses ajax to submit the form, and then opens the new page in a div using ajax so there is no refresh. This works fine. But the problem is this: all...
|
by: Anthony |
last post by:
I have a form on a web page that requires to click on a button to
submit the information. I have two questions about changing this form:
1. Is there a way that I can change the script so that the...
|
by: brendwal |
last post by:
Hi, I am stumped at how to do this:
I have a simple webform that I want the user to enter one value (an address). I then want the form to send those values to a PHP script that processes the...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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$) {
}
...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| |