473,409 Members | 2,022 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,409 software developers and data experts.

Populating Select <option>s with form/frame/js

I'm designing a site for local music and entertertainment and have a
few ?s that need to be cleared up. Currently, I'm working on the Club
part and have a Contact Person form, and a Club form. For the Club
form, I'd like to have up to 4 Contacts with various roles, {Booking,
Manager, Owner, All}.

Ideally, I'd like to have a frameset and have Contact form filled out
1st, allowing me to set a cookie that would populate the
<select><option>s on the Club form, with a Short list of names (1-3)
that have been entered with Contacts.

Possibly, I could even add (using Java Servlets/JSP and MySQL) a
numeric value, supplied by MySQL for the Contact index, for the
<option value=""> after the Contact was entered to get
hypothetically:

<option value="362">Paul Mason</option>
<option value="363">Greg Kimball</option>

This should created easy form entries for the user, If I can get thru
the details. What is the best way to access a text field on a form ??
Use forms[0] or a named form ? or ??
ex: document.forms[0].firstname.value

Also, my onSubmit="myfunc()" which calls alert() and setCookie()
does not seem to be executing. Not sure why.

My other strategy would be to make the 2nd Club page a .jsp file and
make sure it got reloaded. using
top.frames['club'].location.href='ClubEntry.jsp'

My goal easy short cross-referenced data entry. any suggestions ?
Jul 20 '05 #1
1 1971
Figured out a few of my own errors. And I'll start with the
corrections
onSubmit="return doCKinit(this)" place as an attr in the <form>
tag.
use <div id="myID">blah, blah, blah </div>

use the following function
function writeToDiv(div, str)

I still have few questions though; I'm apparently not setting the
cookie value, or at least not getting it back.
Re:
function Set_Cookie(name,value,expires,path,domain,secure)

Do all the param's need to be passed to call this function ?
In other words include null's so the # of params match ?

What format should the expires param be in ?
How can it be used as an offset from now() ?

~~~~~~~~~~~~~~~
The following is a snippet of psuedo-code that doesn't seem to be
working together very well.

Contact_Code:
Set_Cookie("clubk", old_clubk+":"+CK, 60*60, null, null, null );

top.frames['club'].location.href="Club_Form_js1.html";

Club_Code:
var Cval = Get_Cookie("clubk");
alert("Cval is: " + Cval );
Still searching.
Jul 20 '05 #2

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

Similar topics

5
by: Bart Van der Donck | last post by:
Hello, My hair falls out! Is it possible to retrieve the "ordering value" of the <option> that was clicked inside a range of options ? In other words, with something like <option...
6
by: George Hester | last post by:
Try it. Using Microsoft Internet Explorer 5.5 SP2 (that's the version I am using) in Windows 2000 SP3: In a html put this in: <select type="select-one" id="oSel1"> <option value="1"...
2
by: @sh | last post by:
Hi guys, As far as I understand it, there is no possible way to add an OnSelect/Onchange to an actual <option> within a select tag (to perhaps jump to a page or run a DOM command), is this still...
1
by: Raterus | last post by:
Hi there, Should I be concerned with a malicious user spoofing a postback by changing the values for a control like the dropdownlist found in the rendered <option> tags. I would hope asp.net...
6
by: Chris Fink | last post by:
Does anyone know it is possible to include a small image(.gif .jpeg) within a <SELECT><option> so that the user would see the option text as well as a little image(icon) in the option? I know this...
7
by: Shrek | last post by:
I have a drop down on a web page and want to change the cursor from default to pointer, so my style definition has style ="cursor: pointer;" the drop down though fails to change from the...
9
by: Man-wai Chang | last post by:
For a form POST, what's the difference between: 1. <option</option> 2. <option>&nbsp;</option> -- iTech Consulting Services Limited Expert in ePOS (Point-Of-Sales) solutions Website:...
3
by: ganeshp | last post by:
#include<iostream> #include<vector> using namespace std; class option { };
14
by: The Natural Philosopher | last post by:
This is a nasty one and I can't see my way out of it. I have a bunch of select statements in a form, and each select statement has an onchange="do_something(this)" in it, and this works...
0
BarryA
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...
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
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...
0
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
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...
0
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
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...
0
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...

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.