Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Hiding Page Items

New Here ,
Aug 21, 2006 Aug 21, 2006

Copy link to clipboard

Copied

I have my code all jacked up. I want a message to display telling the user to login in first if they are not logged in, nothing more. If they are logged in I want them to see the form withouth the message. Currently the only thing hidden when they aren't logged into the forum is the submit button. I want it all hid, can anyone help me?

<table width="770" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td align="left" valign="top"><table width="760" border="0" cellpadding="2" cellspacing="1" bgcolor="#000000">
<tr>
<td align="left" valign="middle" class="unnamed1">POST</td>
</tr>
<tr>
<form action="inc_posting.asp" method="post" name="post" id="post">
<td align="left" valign="top" bgcolor="#FFFFFF"><table width="675" border="0" align="center" cellpadding="2" cellspacing="2">
<tr align="left" valign="middle">
<td width="150" align="right" class="textBold">User ID: </td>
<td width="524" class="text"><% If Not rsUser.EOF Or Not rsUser.BOF Then %>
<%=(rsUser.Fields.Item("U_ID").Value)%>
<input name="id" type="hidden" id="id" value="<%=(rsUser.Fields.Item("U_ID").Value)%>">
<% End If ' end Not rsUser.EOF Or NOT rsUser.BOF %>
<input name="parent" type="hidden" id="parent" value="<%= Request.QueryString("iMsg") %>">
<input name="dated" type="hidden" id="dated" value="<%= date() %>">
</td>
</tr>
<tr align="left" valign="middle">
<td align="right" class="textBold">Subject: </td>
<td class="text"><% If Not rsMsg.EOF Or Not rsMsg.BOF Then %>
Re: <%=(rsMsg.Fields.Item("MSG_SUBJECT").Value)%>
<% End If ' end Not rsMsg.EOF Or NOT rsMsg.BOF %>
<% If rsMsg.EOF And rsMsg.BOF Then %>
<input name="subject" type="text" class="form" id="subject" size="60" maxlength="50">
<% End If ' end rsMsg.EOF And rsMsg.BOF %>
</td>
</tr>
<tr align="left" valign="middle">
<td align="right" class="textBold">Forum: </td>
<td class="text"><%=(rsForListing.Fields.Item("FOR_NAME").Value)%>
</td>
</tr>
<tr align="left" valign="middle">
<td align="right" class="textBold"> </td>
<td class="text"><textarea name="message" cols="80" rows="15" class="form" id="message"></textarea></td>
</tr>
<tr align="left" valign="middle">
<td align="right" class="textBold"> </td>
<td class="text"><% If Not rsUser.EOF Or Not rsUser.BOF Then %>
<input name="Submit" class="btn" type="submit" value="Post">
<% End If ' end Not rsUser.EOF Or NOT rsUser.BOF %>
<% If rsUser.EOF And rsUser.BOF Then %>
To post or reply a topic, please <a href="login.asp">login</a> first. If you have not register, <a href="register.asp">click here</a>.
<% End If ' end rsUser.EOF And rsUser.BOF %>
</td>
</tr>
</table></td>
<input type="hidden" name="MM_insert" value="post">
</form>
</tr>
</table></td>
</tr>
</table>
TOPICS
Server side applications

Views

303
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 21, 2006 Aug 21, 2006

Copy link to clipboard

Copied

LATEST
You need to find the beginning if to this statement, and place it outside
your table. Then, place this chunk below your table, that should do it.

<% End If ' end Not rsUser.EOF Or NOT rsUser.BOF %>
<% If rsUser.EOF And rsUser.BOF Then %>
To post or reply a topic, please <a href="login.asp">login</a> first.
If
you have not register, <a href="register.asp">click here</a>.
<% End If ' end rsUser.EOF And rsUser.BOF %>

"ClayD" <webforumsuser@macromedia.com> wrote in message
news:ecd6u7$f7j$1@forums.macromedia.com...
>I have my code all jacked up. I want a message to display telling the
>user to
> login in first if they are not logged in, nothing more. If they are
> logged in
> I want them to see the form withouth the message. Currently the only
> thing
> hidden when they aren't logged into the forum is the submit button. I
> want it
> all hid, can anyone help me?
>
> <table width="770" border="0" align="center" cellpadding="2"
> cellspacing="2">
> <tr>
> <td align="left" valign="top"><table width="760" border="0"
> cellpadding="2" cellspacing="1" bgcolor="#000000">
> <tr>
> <td align="left" valign="middle" class="unnamed1">POST</td>
> </tr>
> <tr>
> <form action="inc_posting.asp" method="post" name="post" id="post">
> <td align="left" valign="top" bgcolor="#FFFFFF"><table
> width="675"
> border="0" align="center" cellpadding="2" cellspacing="2">
> <tr align="left" valign="middle">
> <td width="150" align="right" class="textBold">User ID:
> </td>
> <td width="524" class="text"><% If Not rsUser.EOF Or Not
> rsUser.BOF Then %>
> <%=(rsUser.Fields.Item("U_ID").Value)%>
> <input name="id" type="hidden" id="id"
> value="<%=(rsUser.Fields.Item("U_ID").Value)%>">
> <% End If ' end Not rsUser.EOF Or NOT rsUser.BOF %>
> <input name="parent" type="hidden" id="parent"
> value="<%=
> Request.QueryString("iMsg") %>">
> <input name="dated" type="hidden" id="dated"
> value="<%=
> date() %>">
> </td>
> </tr>
> <tr align="left" valign="middle">
> <td align="right" class="textBold">Subject: </td>
> <td class="text"><% If Not rsMsg.EOF Or Not rsMsg.BOF Then
> %>
> Re: <%=(rsMsg.Fields.Item("MSG_SUBJECT").Value)%>
> <% End If ' end Not rsMsg.EOF Or NOT rsMsg.BOF %>
> <% If rsMsg.EOF And rsMsg.BOF Then %>
> <input name="subject" type="text" class="form" id="subject"
> size="60"
> maxlength="50">
> <% End If ' end rsMsg.EOF And rsMsg.BOF %>
> </td>
> </tr>
> <tr align="left" valign="middle">
> <td align="right" class="textBold">Forum: </td>
> <td
> class="text"><%=(rsForListing.Fields.Item("FOR_NAME").Value)%>
> </td>
> </tr>
> <tr align="left" valign="middle">
> <td align="right" class="textBold"> </td>
> <td class="text"><textarea name="message" cols="80"
> rows="15"
> class="form" id="message"></textarea></td>
> </tr>
> <tr align="left" valign="middle">
> <td align="right" class="textBold"> </td>
> <td class="text"><% If Not rsUser.EOF Or Not rsUser.BOF
> Then %>
> <input name="Submit" class="btn" type="submit"
> value="Post">
> <% End If ' end Not rsUser.EOF Or NOT rsUser.BOF %>
> <% If rsUser.EOF And rsUser.BOF Then %>
> To post or reply a topic, please <a href="login.asp">login</a>
> first. If
> you have not register, <a href="register.asp">click here</a>.
> <% End If ' end rsUser.EOF And rsUser.BOF %>
> </td>
> </tr>
> </table></td>
> <input type="hidden" name="MM_insert" value="post">
> </form>
> </tr>
> </table></td>
> </tr>
> </table>
>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines