[ List Archives Home ] [ Thread index for 2008 ]
[ Date index for 2008 ]
[ Author index for 2008 ]
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Andrew,
Wow! Thanks for the custom javascript. I'll try it out and let you
know if I have any questions.
Alicia
-----Original Message-----
From: innopac-bounces at innopacusers dot org
[
mailto:innopac-bounces at innopacusers dot org] On Behalf Of Welch, Andrew
Sent: Thursday, November 15, 2007 8:06 AM
To: IUG INNOPAC List
Subject: Re: [IUG] Self Registration Field Modification
Hi Alicia,
I don't think you can accomplish what you want without javascript. Below
is one way you could do it.
Replace your current birthday field HTML:
*******
Birthday:
<input type="text" value="" size="20" maxlength="20"
name="F051birthdate"/>
*******
with the following:
*******
Birth year (4 digits):
<input type="hidden" name="monthday" value="0101" />
<input type="text" size="6" maxlength="4" name="birthyear" value=""
onfocus="this.select();" onchange="calcBday()" />
<input type="hidden" name="F051birthdate" value="" />
<script type="text/javascript">
<!--
var regform = document.selfreg_form;
function calcBday() {
var bday1 = regform.monthday.value;
var bday2 = regform.birthyear.value;
var checkDig = new RegExp('[12][0-9]{3}');
if (bday2.search(checkDig) == -1) { // if the year entered isn't
4 digits beginning with a 1 or 2;
alert("Please enter a valid 4-digit year."); // ask the
patron to re-enter;
setfocus('regform.birthyear'); // put the cursor in the
birth year field;
}
else { // otherwise...
regform.F051birthdate.value = bday1 + bday2; // the
value of the III birthdate field = '0101' + the year entered.
}
}
function setFocusDelay()
{ regform.birthyear.focus(); }
function setfocus(fval)
{ setTimeout( 'setFocusDelay()', 100 ); }
-->
</script>
*******
This will force the user to enter a valid 4-digit year (a 1 or 2
followed by 3 digits), prepend "0101" to it, and place it in the III
'F051birthdate' field until the form is submitted. If this isn't what
you were after, or if you have questions about this, let me know and
I'll see what else we might do.
Regards,
Andrew Welch
Sr. Library Systems Technician
Aurora Public Library
Aurora, CO 80012
http://auroralibrary.org
-----Original Message-----
From: innopac-bounces at innopacusers dot org on behalf of Abramson, Alicia
Sent: Wed 11/14/2007 4:13 PM
To: innopac at innopacusers dot org
Subject: [IUG] Self Registration Field Modification
We are implementing self registration soon, and want to ask our users
for their birth year only, not their full birth date. We want to do
this as a way to keep our patron types updated on an annual basis, but
also don't want to collect unnecessary private information from our
patrons.
My question is how to handle putting that data into Innovative, since
Innovative is expecting mmddyyyy. Ideally there would be a way for us
to tack on 0101 to yyyy to get 0101yyyy which is then sent to III.
Thanks,
Alicia Abramson
Manager Library Information Technology
Berkeley Public Library
aabramson at ci dot berkeley dot ca dot us <
mailto:aabramson at ci dot berkeley dot ca dot us>
510-981-6131
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
--
This message was distributed through the Innovative Users Group INNOPAC
list
Public replies: INNOPAC at innopacusers dot org
Update your subscription options:
http://innopacusers.org/mailman/listinfo/innopac
--- StripMime Report -- processed MIME parts ---
multipart/mixed
text/plain (text body -- kept)
application/ms-tnef
---
--
This message was distributed through the Innovative Users Group INNOPAC
list
Public replies: INNOPAC at innopacusers dot org
Update your subscription options:
http://innopacusers.org/mailman/listinfo/innopac