473,585 Members | 2,512 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Passing form elements from/to HTML pages via JavaScript...

Hello,

I am trying to get all of my form elements passed correctly from the
following URL:
http://www.dslextreme.com/users/kevi...lectBoxes.html
to the following URL:
http://www.dslextreme.com/users/kevi...ctResults.html

I am passing name, email, countries, cities, products, courses, etc.
The others display as they should on the subsequent page,
but the courses retains my loop variable rather than the value as I
would like.

I am concerned that my JS & HTML code function correctly for an
intranet site working in an IE environment only, but I have
a few errors that I am trying to implement (which need fixing):

1) I am getting an error each time I select a different city name.
Could the underscores be an issue for the courses when UK
or US is selected?

2) Should all occurrences of "_" within the code be streamlined
against being used? If so, similarly to the city names code,
should the 'courses' data be an associative array object as well?

3) Another had suggested using a 'dynamic' index for comparison for
the courses data validation on the suggest input box? I
have tried different variations to correct this, but I cannot get it
to work.

These two lines in particular pertain to what was suggested about
using a variation of this replacement code:
if(document.ora cle.courses.opt ions[somePassedNdx].value == 'someFlag')

if (data.courses.v alue == "" || data.courses.op tions[17].selected) {
if (data.courses.o ptions[18].selected) {

4) Furthermore, how can I resolve my course name also passing for the
results page:

One suggested, "can I pass the associated array text value instead of
the number of the array. Simply, create a hidden field,
pass the text value to the hidden field -- pick up the hidden field in
the receiving page and ignore the passed index."

To no avail I have tried; how do I go about writing the hidden field
portion so that it can populate the results page?

5) For my date select box data validation, I have a portion of it
written near the bottom of the function verifyData(data ), but I
am having trouble verifying if the selected date is before or after
the current date. How can I compare the selected date with
today's date so that one doesn't select a date prior to today's?

6) Lastly, if a product is selected before the country is selected and
auto-populates the courses, the courses don't populate
unless a product radio button is reselected. Can this be avoided?

I welcome anyone to review the code from each to see what I can do to
correct things. Can someone assist? Again, the
pages can be viewed from the following URL:
http://www.dslextreme.com/users/kevi...lectBoxes.html

Thanks much,

Kevin
Jul 20 '05 #1
1 4588
And on the day 14 Oct 2003 09:12:16 -0700, ma*********@go. com
enlightened us with <63************ **************@ posting.google. com>...
Hello,

I am trying to get all of my form elements passed correctly from the
following URL:
http://www.dslextreme.com/users/kevi...lectBoxes.html
to the following URL:
http://www.dslextreme.com/users/kevi...ctResults.html


First off, this didn't work at all in IE6/WinXP. Got an error and
couldn't get to the next page at all - couldn't select a course. The
browser has no idea what this is and neither do I.
category = window[selectChoice + "_" + radioChoice];
I get an error when you try to access category.length . Null or not an
object. What are you trying to do here? Your code has no comments.
Trying to decide what you want it to do is not an easy thing.

Also, a bug - when the page is refreshed, the city is still there, but
no cities are listed. To fix that, add the fill to the onload.

<body onload="if(docu ment.oracle.cou ntries.selected Index == 0)
document.getEle mentById('hide' ).style.display = 'none'; else fillCity
(document.oracl e.countries.opt ions
[document.oracle .countries.sele ctedIndex].value);"><!-- _HEADER_START_
--><!-- _HEADER_END_ -->

There is a function call that I can't find the function...and neither
can my browser.
<SELECT onchange=select City(this) size=1 name=cities>
where is the function selectCity()?

Fix that stuff and see if it helps.

--------------------------------------------------
~kaeli~
Kill one man and you are a murderer. Kill millions
and you are a conqueror. Kill everyone and you
are God.
http://www.ipwebdesign.net/wildAtHeart/
http://www.ipwebdesign.net/kaelisSpace/
------------------------------------------------
Jul 20 '05 #2

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

Similar topics

12
6528
by: Kevin Lyons | last post by:
Hello, I am trying to get my select options (courses) passed correctly from the following URL: http://www.dslextreme.com/users/kevinlyons/selectBoxes.html I am having difficulty getting the courses to pass the correct option value and then be displayed at the following URL: http://www.dslextreme.com/users/kevinlyons/selectResults.html ...
2
2526
by: Richard | last post by:
**** Post for FREE via your newsreader at post.usenet.com **** HI, I am working on a project where I need to input data to a (local) HTML page using multiple form elements, such as text, radio, checkbox, and dropdown. When the form Submit button is clicked, I then need the input data either written to another location on the same page, or...
2
1836
by: Axel Foley | last post by:
Hi Folks, i'm newbie at JS; but "learning by tweaking" is my middle name! Trying to set up a link partnership application on a client's site; got this script at "The Javascript Source", but it does not work for me. If anyone would be so kind as to comb it for apparent flaws, I would be greatly indebted! My <form> statement includes the...
6
1640
by: Eric Johnston | last post by:
I want the visitor to enter three numbers on the page and then click a button "generate image" which will I hope cause a generated gif image to be displayed alongside on the page. This involved a php page elsewhere which does all the computing of the gif image. I can make this work successfully by using a static call like: <img...
9
2161
by: Max | last post by:
I'm new with Javascript and can't seem to figure out what I'm doing wrong here as I'm not able to pass a simple variable to a function. In the head of doc I have: <script type="text/javascript"> function radioenable(value) { document.forms.search.elements.value.disabled=false;
1
2269
by: williamroy | last post by:
Hello, I've got a form that runs over 5 pages. I need the last page submit button to post all of the answers at one time from the previous 5 pages (to another server). I'd like to see the last page of the form post all answers in clean ?= format as though all form elements were from one page. I use GET to pass name/value pairs from the...
2
4875
by: this one | last post by:
I have the following code <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script language="JavaScript" src="..\include\gen_validatorv2.js" type="text/javascript"></script> </head>
11
2982
by: Rik | last post by:
Hello guys, now that I'm that I'm working on my first major 'open' forms (with uncontrolled users I mean, not a secure backend-interface), I'd like to add a lot of possibilities to check wether certain fields match certain criteria, and inform the user in different ways when the data is wrong (offcourse, this will be checked on posting the...
17
479
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I get the value of a form control? ----------------------------------------------------------------------- In HTML documents, named forms may be referred to as named properties of the « document.forms » collection, and named form controls may be...
0
7835
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8334
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
5707
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
5386
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
3831
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
3856
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2340
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
1
1444
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1171
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.