hiding an HTML object

Author Message
qatzo

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 3/8/2011
  • Status: offline
hiding an HTML object Tuesday, March 08, 2011 2:29 PM (permalink)
0
I can hide objects using client-side VBS, but it won't work in server-side. Here's my code:
 
<head>
<%
divname.style.visibility = "hidden"
%>
</head>
 
<body class= "classname" onload="myonload">
<div id= "divname">
</div>
</body>
 
I discovered that in client-side VBS, I needed a subroutine to execute the hiding command (and I just used 'sub myonload'). But I need ASP to retrieve form data.
 
Right now I'm getting an error message.
 
Do I need a subroutine? And if so, why?
Sorry for being such a noob at this  >.<
Thanks!
 
#1
    webber123456

    • Total Posts : 58
    • Scores: 0
    • Reward points : 0
    • Joined: 9/20/2007
    • Status: offline
    Re:hiding an HTML object Thursday, March 10, 2011 4:39 PM (permalink)
    0
    for server side code to inject into cientside then you must think in terms of writing the information back to the user
     
    <% Response.write("divname.style.visibility = ""hidden"" ") %>
    please note - double quotes acts as an escape
     
    or
     
    <%= "divname.style.visibility = ""hidden"" " %>
     
    will also work
     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9