Hi Everybody,
I really need a second opinion from someone on using
DIV's. My page has a form with two div's, the first
div, has two text fields and a button with a onClick
event. When the user hits the button, the second div
is displayed. Here's my code:

<html>
<head>
    <title>DIV Example</title>

<style>
.normal{position:absolute;top:100px;left:100px;display:inline;}
.hidden{position:absolute;top:-200px;left:-200px;display:none;}
</style>

<script>
function pressedGo(){
    if (document.getElementById("superDiv1").className
== "hidden"){
   document.getElementById("superDiv1").className =
"normal";
   document.getElementById("superDiv").className =
"hidden";
     }
}
  
</script>

</head>

<body>
<form name="frm" method="post">
<table width="100%" border="0">
  <tr>
   <td align="left">
    <div id="superDiv" style="position:absolute;
z-index:2; top: 50px; left: 5px; border: 1px none
#000000;" class="normal">
             <table width="100%" border="0">
          <tr>
            <td align="left">
           Enter user name <input type="text"
name="userName"> or area  
<input type="text" name="area">
   <input type="button" name="go" value="go"
>     </td>
        </tr>
        </table>
        </div>
    </td>
  </tr>
      
  <tr>
    <td width="100%" valign="top">
        <div id="superDiv1" style="position:absolute;
z-index:2; top: 50px; left: 5px; border: 1px none
#000000;" class="hidden">
        <table width="100%" border="0">
          <tr>
          <td align="left">
             <p><input type="text"
name="txtField1"></p>
             <p><input type="text"
name="txtField2"></p>
             <p><input type="text"
name="txtField3"></p>
             <p><input type="text"
name="txtField4"></p>
        </td></tr></table>
        </div>
    </td>
</tr>
</table>
</form>

</body>
</html>

The code above is fairly st8forward, I hope. What I
want it to actually do is pass the usename form field
value from div 1 and pass the value to a query in div
2 and display the user details in the div 2 text
fields without
actually submitting the form. Is this possible? Is
there any other way at all to do this sort of a thing?

Many Thanks
CF Developer

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to