Probably a fairly simple problem but one that's been plaguing me for a
couple of days... can anyone help?
I have a classic ASP page with a number of text boxes which are updatable.
For convenience I want to add 'tabs' at the top of the page (like a card
index) as the data to be displayed is split into specific groups (client,
company, preferences, events).
How do I update any changes to the data and switch to a different page - at
the same time? i.e. the user doesn't have to click 'update' (submit button)
before changing pages
Sample code is below...
Thanks in advance
Simon
Sample code:
<table width=785 height="430" border="1" bordercolor="#FFFFCC"
style="border-collapse: collapse"><tr>
<td height="20">
<!-- simple tabs -->
<a href="contacts.asp?id=<% =request("id") %>" >Client details</a>
¦
<a href="contacts.asp?page=events&id=<% =request("id") %>" >Event
Enquiries</a> ¦
<a href="contacts.asp?page=mailing&id=<% =request("id") %>" >Mailing
Preferences</a> ¦
<a href="contacts.asp?page=company&id=<% =request("id") %>" >Company
Information</a></td></tr><tr>
<td height="410" bgcolor="#FFFFCC" valign="top">
<table border="0" width="785" height="410">
<tr>
<td valign="top" height="390">
<table border="0" width=785>
<tr>
<td>
<!-- start of form -->
<form action=contacts.asp method=post name=form1>
<input type=hidden name=id value=<% =request("id") %>>
<input type=hidden name=page value=<% =request("page") %>>
<input type=hidden name=show value=<% =Request.Cookies("adminshow") %>>
<input type=hidden name=companyid value=<% =oRS("companyid") %>>
<div align="center">
<table border=0 width=782 height=395>
<tr>
<td width="340" valign="top">
<table border="0" width="100%">
<tr>
<td width="100" align="right">title</td>
<td width="10" align="right"> </td>
<td width="230"><select size="1" name="title">
<option>-</option>
<option selected><% =oRS("title") %></option>
<option>Mr</option>
<option>Mrs</option>
<option>Miss</option>
<option>Ms</option>
<option>Dr</option>
</select></td>
</tr>
<tr>
<td width="100" align="right">first name</td>
<td width="10" align="right"> </td>
<td width="230">
<input type="text" name="name" size="25" value='<% =oRS("name")
%>'></td>
</tr>
....
<!-- more form fields here -->
</table>
</td>
</tr><tr><td colspan="3" height="195">
<p align="center">
<textarea rows="10" name="callbacknote" cols="92"><%
=oRS("callbacknote") %></textarea></td>
</td></tr>
</table>
</div>
</tr>
</table>
</td>
</tr>
<tr><td>
<hr><div align=center>
<a href="index.asp?page=callbacks&show=<% =varID %>">back</a>
<input type="submit" value=" update " name="update">
<input type="button" value=" copy " name="B4"
onclick="recordcopy()">
<input type="button" value=" delete " name="B5"
onclick="recorddelete()">
<input type="button" value=" print " name="B6"
onclick="recordprint()">
</div>