Tabbed form field won't update 
Author Message
 Tabbed form field won't update

The following code does not work. I modify the extatt1
variable and want to see
its modified value when mbsave.asp executes. Instead I
just see the original value i.e 15.
To reproduce
1. Take the first block of code and save as default.asp.
2. Take the second block of code and save as mbsave.asp
3. Create IIS virtual directory pointing to directory
where the files default.asp and mbsave.asp are.

This is default.asp
-----------------------------------------------------------
<html>
<head>
<title>Mailbox Information</title>
<style>
...conts        {visibility:hidden}
...tab  {       border-top:solid thin #E0E0E0;
                        border-right:solid thin gray;
                        border-left:solid thin #E0E0E0;
                        font-family:Verdana;
                        font-size:10pt;
                        text-align:center;
                        font-weight:normal}

...selTab       {       border-left:solid thin white;
                        border-top:solid thin white;
                        border-right:solid thin black;
                        font-weight:bold;
                        text-align:center}

</style>
<script LANGUAGE="JavaScript">

//sets the default display to tab 1
function init(){
        tabContents.innerHTML = t1Contents.innerHTML;

Quote:
}      

//this is the tab switching function
var currentTab;
var tabBase;
var firstFlag = true;

function changeTabs(){

        if(firstFlag == true){
                currentTab = t1;
                tabBase = t1base;
                firstFlag = false;
        }

        if(window.event.srcElement.className == "tab"){

                currentTab.className = "tab";
                tabBase.style.backgroundColor = "white";
                currentTab = window.event.srcElement;
                tabBaseID = currentTab.id + "base";
                tabContentID = currentTab.id + "Contents";
                tabBase = document.all(tabBaseID);
                tabContent = document.all(tabContentID);
                currentTab.className = "selTab";
                tabBase.style.backgroundColor = "";
                tabContents.innerHTML =
tabContent.innerHTML;
        }

Quote:
}

</script>

</head>

<body BGCOLOR="#C0C0C0" onclick="changeTabs()" onload="init
()" BGCOLOR="#FFFF99" TEXT="#000000" LINK="#000000"
VLINK="#000000">

<div STYLE="position:absolute; top:40; height:350;
width:500; left:25; border:none thin gray">

<table STYLE="width:100%; height:250" CELLPADDING="0"
CELLSPACING="0">
        <tr>
                <td ID="t1" CLASS="selTab" HEIGHT="25"
style="cursor:hand">General</td>
                <td ID="t4" CLASS="tab"
style="cursor:hand">Custom Attributes</td>
        </tr>
        <tr>
                <td ID="t1base" STYLE="height:2; border-
left:solid thin white"></td>
                <td ID="t4base" STYLE="height:2;
background-color:white"></td>
        </tr>

        <tr>

                <td HEIGHT="*" COLSPAN="7"
ID="tabContents" STYLE=" border-left:solid thin
white;
                border-bottom:solid thin white;
                border-right:solid thin white"></td>
        </tr>
</table>

<form NAME="mbInfo" method=POST action="mbsave.asp">
<input TYPE="submit" VALUE="Modify User Values">
<input TYPE="button" VALUE="Exit"
OnClick="window.location='logon.asp'">
<br>
</div>

<!-- Draw out the tab for General -->
<div CLASS="conts" ID="t1Contents">
<table WIDTH="600" border="0">
<tr>
<td width="100%" colspan="10"><font FACE="Arial,
Helvetica" SIZE="5"><b></b></font></td>
</tr>

</table>
</div>

<div CLASS="conts" ID="t4Contents">
<!--  Draw out the tab for Custom Attributes -->
<table width="600">

<tr>
<td width="100%" colspan="5"><font FACE="Arial, Helvetica"
SIZE="5"><b></b></font></td>
</tr>

<tr>&nbsp;</tr>
</table>
<table>

<tr><td ALIGN="RIGHT" NoWrap><font FACE="Arial, Helvetica"
SIZE="2"><label>Parameter</label></td>
<td><font FACE="Arial, Helvetica" SIZE="2"><b><input
TYPE=text NAME="extatt1" value="<%=Server.HTMLEncode(15)%

Quote:
>"></b></font></td>

</table>

</form>
</div>

</body>
</html>

-----------------------------------------

This is what mbsave.asp looks like
-----------------------------------------
<%
call PutAttrib(Request.Form.Item(1))

sub PutAttrib(Value)
        Response.Write CStr(Value)
end sub
%>



Sun, 16 May 2004 08:32:21 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. storing JPG's in databases

2. documentation and cod

3. Tabbed Form Field won't update

4. Tabbing between form fields in Netscape 4.7 - Win 95

5. TITLE field won't update in header table

6. Sheridan Tab control won't switch tabs

7. form won't update after query changed in VBA

8. Pasting Form Fields won't Work

9. MYSTERY SOLVED: Updating user form field's default text

10. Updating fields: footer doesn't update right

11. CR reports in VB4 won't update (I've tried the usual solutions)

12. Advancing to next form field with Enter key instead of Tab

 

 
Powered by phpBB® Forum Software