473,480 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

javascript submit() function performs differently from clicking submit

I'm posting this again because I did not explain myself well the first
time, so the problem was not being addressed. I made the following
page ( http://perla.princeton.edu/counselors/organization.php ) solely
for the purpose of showing a bug. It is not production code, it is a
test, made for testing, so style really doesn't matter.

This page illustrates that, for some reason, clicking on the submit
button has a different effect on the results page than running the
javascript submit() function. Try it out for yourself. Click the
submit button on top. It returns results 1-15 of the organizations at
nacacnet.org. Now, click the second button, which runs the javascript
submit() function, it returns results 76-90. This is what _should_ be
returned. Unfortunately, I cannot understand why clicking the submit
button should be any different, since the same fields are posted to the
server (use Firefox's page info while the results are loading to see
that this is true). Are the headers different for some reason?

I do not need a solution or an alternative, as this is not a real page
for production use, nor is it an example page for production use. I
have an intellectual curiosity to understand how javascript works at
the most basic level to understand why different results would come
between these two methods of submitting.

May 18 '06 #1
2 2214
Tim
Click the
submit button on top. It returns results 1-15 of the organizations at
nacacnet.org. Now, click the second button, which runs the javascript
submit() function, it returns results 76-90. This is what _should_ be
returned.


Here's the html for the submit button which incorrectly returns results
1-15

<input type="submit" name="ucSearch:btnSearch" id="ucSearch:btnSearch"
value="Click Submit Button" />

If you remove the id and name attribute's then both buttons return
results 76-92.

Richard Cornford explained why this happens when he replied to your
earlier post.

Tim

May 18 '06 #2
Thank you. Also, thank you very much Richard Conford. I must have
missed his explanation earlier when I was reading the previous replies.
So, I guess when javascript runs the submit() function, it doesn't
send the name/value pair, but when you click the button, it does send
the name/value pair. Thanks again.
j

May 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4872
by: Margaret Werdermann | last post by:
Hi all: I'm having a nasty time with a particularly difficult piece of code and was hoping someone might be able to help me. I have a FormMail form that originally worked perfectly. Then, I...
4
5450
by: houstoncity2004 | last post by:
Hi, I need help to JavaScript. I am new to this, and am trying to the page online ASAP. I have two submit buttons on one form, and each button will have to do different things. I named both...
6
4015
by: Joop | last post by:
Hi all, I'm kinda new to JavaScript, but hey... I'm trying anyway! ;-) So, here's my problem : I've created a table in my document, presenting a list of items, one can 'select' by clicking...
4
3389
by: frogman042 | last post by:
My daughter is playing around trying to learn JavaScript and she wrote a small program that prints out a message in increasing and decreasing font size and color changes. She is using document...
1
2436
by: Scott | last post by:
I have an asp.net page that performs a function for a user that can take up to 30 seconds. So, I have a javascript function that shows an animation to let the user know something is going on. I...
2
3104
by: 23s | last post by:
My site's login page has a form w/ 2 textboxes and a submit button. If I'm in either of those textboxes (i.e., either one of the textboxes has focus), in any given browser, hitting "enter" on my...
9
2057
by: Rainman | last post by:
In my HTML, I have several of the following: <input type='checkbox' name='right' id='right' value='0' /> All are the same except the value is set differently for each one. The reason for the ...
1
2158
by: dreamlab | last post by:
Hello, Can one of you javascript wizards help out a newbie, please? I’ve got a formHandler that is supposed to check for a good email address and name in the form after clicking the submit...
3
5229
by: Beamer | last post by:
Hi I am trying to build a roating slide effect in javascript. Basically, I have a list like below <ul id="slideShowCnt"> <li id="slide0"><img .../></li> <li id="slide0"><img .../></li> <li...
0
7037
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
6904
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
7034
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
7076
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...
0
6886
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...
0
4472
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...
0
2990
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...
0
1294
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 ...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.