robertritz
Technical User
I am very new to javascript and this is what I have cobbled together. When I am testing it out it doesn't do anything at all, just reloads. I have tried several display methods and nothing seems to work. Thanks.
<html>
<head>
<title>Generate URL for Shared Outlook Calendar</title>
<script language="Javascript" type="text/javascript">
<script>
function urlgenerator()
{
textstring = '';
name = document..getElementById("firstname").value;
lname = document.getElementById("lastname").value;
cname = document.getElementById("calendarname").value;
textstring += ' + name + '.' + lname + '@unt.edu/?cmd=contents&f=' + cname;
document.forms["urlgen"].output.value=textstring
}
window.onload = urlgenerator;
</script>
</head>
<body>
<form>
<form name="urlgen">
<h1 ID="head1">Create URL for Shared Outlook Calendar</h1>
<p>Fill out the form below to generate a URL for a shared Outlook calendar.</p>
<form name="example" action="#" onsubmit="checkit(); return false">
<table class="form">
<tr>
<td>First Name</td>
<td><input type="text" id="firstname" value=""></td>
</tr>
<tr>
<td>Last Name</td>
<td><input type="text" id="lastname" value=""></td>
</tr>
<tr>
<td>Calendar Name</td>
<td><input type="text" id="calendarname" value=""></td>
</tr>
<input type="submit" value="Generate URL" onsubmit="Javascript:urlgenerator()" />
</form>
</body>
</html>
<html>
<head>
<title>Generate URL for Shared Outlook Calendar</title>
<script language="Javascript" type="text/javascript">
<script>
function urlgenerator()
{
textstring = '';
name = document..getElementById("firstname").value;
lname = document.getElementById("lastname").value;
cname = document.getElementById("calendarname").value;
textstring += ' + name + '.' + lname + '@unt.edu/?cmd=contents&f=' + cname;
document.forms["urlgen"].output.value=textstring
}
window.onload = urlgenerator;
</script>
</head>
<body>
<form>
<form name="urlgen">
<h1 ID="head1">Create URL for Shared Outlook Calendar</h1>
<p>Fill out the form below to generate a URL for a shared Outlook calendar.</p>
<form name="example" action="#" onsubmit="checkit(); return false">
<table class="form">
<tr>
<td>First Name</td>
<td><input type="text" id="firstname" value=""></td>
</tr>
<tr>
<td>Last Name</td>
<td><input type="text" id="lastname" value=""></td>
</tr>
<tr>
<td>Calendar Name</td>
<td><input type="text" id="calendarname" value=""></td>
</tr>
<input type="submit" value="Generate URL" onsubmit="Javascript:urlgenerator()" />
</form>
</body>
</html>