473,564 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

why does the page keep going up?

3 New Member
I've got this code where when you click the '-' or '+' link the text in the textbox increments or decrements. But let's say this is at the end of the page after it is scrolled all the way to the bottom; when I click it, the page zooms back up and it's annoying because I have to scroll down again to click it.

The reason why there are so many breaks is to make it be at the bottom where you have to scroll to access it. Put the code below in the notepad as HTML and view it. When you click the java link, it will zoom back up. Is there anyway I can prevent that? Thanks

-jong

<html>
<head>

<script type="text/javascript">
function increment(test) {

if (test.value.cha rCodeAt(0) < 90){
if(test.value.c harCodeAt(0) == 45){test.value = String.fromChar code(eval(45))}
test.value = String.fromChar Code(eval(test. value.charCodeA t(0) + 1))
}else
test.value = String.fromChar code(eval(90))
}

function decrement(test) {
if (65 < test.value.char CodeAt(0)){
test.value = String.fromChar Code(eval(test. value.charCodeA t(0) - 1))
}else
test.value = String.fromChar code(eval(65))
}
</script>



</head>
<body>
<form>
Enter random text
<br>
<br>

<br>
<br>

<br>
<br>

<br>
<br>

<br>
<br>

<br>
<br>

<br>
<br>
<br>
<br>

<br>
<br>

<A href="#" onclick="javasc ript:decrement( num)">-</a>
<input type="text" name="test" value="A" id="num" size="1">
<A href="#" onclick="javasc ript:increment( num)">+</a>

</form>

</body>
</html>
Aug 3 '05 #1
1 3134

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

Similar topics

4
2330
by: lawrence | last post by:
Maybe its late and I'm tired but I don't understand what I'm seeing on the screen. I have this block of code: $choiceMade = $_GET; if ($simpleMode == "y" && $choiceMade == "") { startPage(); printEasyControlPanelOptions(); endPage();
15
2114
by: middletree | last post by:
How do I request the actual page name that I'm on? This is going to go into an include file, and depending on which page I'm on, I'd like to do different things. I'm looking for "pagename.asp"
6
1765
by: greenflame | last post by:
I have been working for some time on a script that will show a matrix with the elements aligned on the right for sometime and finally got it to work. Then I did some patching up and ran the script and it showed a blank page and no error in the status bar. The script is rather long and I call functions that do things that I may not need the...
8
1687
by: windandwaves | last post by:
Hi Folk I want to create something like AMAZON: those who liked page A also liked page B (I am going to apply the concept to a few different selections, but to keep it simple I will talk about page popularity here - like AMAZON talks about purchase patterns: those who bought A also bought B, C and D). In my mysql table, I record everytime...
11
3192
by: Brian W | last post by:
Yet another editor problem To reproduce do the following 1) Open a Webform and switch to HTML edit mode 2) Enter the Following (include spaces) This is some text before <asp:hyperlink id="hl1" runat="server " navigateurl="http://www.microsoft.com">This is my link</asp:hyperlink> And this is my text after the Hyperlink
6
2540
by: Nad | last post by:
Hello, In order to go back to the previous page from a page with possible postbacks I keep Request.Referrer in ViewState and then use it to redirect to the previous page. However I am losing all the information entered in the previous page. I also want to keep the entries in many fields/controls in the previous page. Is there a way to...
14
4823
by: Anoop | last post by:
Hi, I am new to this newsgroup and need help in the following questions. 1. I am workin' on a GUI application. Does C# provides Layout Managers the way Java does to design GUI? I know that it can be done using the designer but I intentionally don't want to use that. The one reason is that you cannot change the code generated by the...
130
6454
by: Daniel Manes | last post by:
I'm baffled. I have a column in a SQL Server Express database called "Longitude," which is a float. When I view the table in a DataGridView, some of the numbers, which only have two decimal places in the database show up with *15* decimal places and are ever so slightly off (in the example in the subject line, by about 2E-15). I'm not doing...
3
2005
by: salad | last post by:
I have an A97 application that is NOT split on a network. It is used by 15+ folks continually. It is quick and fast. I split it several years ago and had to merge it together again after the folks rebelled at the slow speed resulting from the split. I have to bite the bullet and split it now. Of course, it is much slower. In one form...
162
10111
by: Sh4wn | last post by:
Hi, first, python is one of my fav languages, and i'll definitely keep developing with it. But, there's 1 one thing what I -really- miss: data hiding. I know member vars are private when you prefix them with 2 underscores, but I hate prefixing my vars, I'd rather add a keyword before it. Python advertises himself as a full OOP language,...
0
7888
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7642
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...
0
6255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5213
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...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
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
0
924
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...

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.