Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 29th, 2004, 03:15 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Default HTML scripting


Hi all,

  can anyone please point me to examples/explanation of how to
use the <% if [condition1] ><HTML><%else><OTHER HTML><%endif>
construct ?

TIA>

 
Old July 29th, 2004, 07:58 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

<% %> is an ASP designation, you need to read about ASP to figure that out.
 
Old July 29th, 2004, 09:15 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 623
Thanks: 0
Thanked 1 Time in 1 Post
Default

you can do it like below
---------------------
<div id=1 style="display:'none'">
...
</div>
<div id=2 style="display:'none'">
....
</div>
<script language="JavaScript">
if (Condition)
  document.getElementById("1").style.display="";
else
  document.getElementById("2").style.display="";
</script>
------------------
HTH.

--------------------------------------------
Mehdi.
 
Old July 29th, 2004, 10:00 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks guys - I got confused between ASP and HTML tags.

I've been to the bookshop and bought 4 books on HTML,
JavaScript and ASP.NET.

Things are becomming clearer.

Chas.






Similar Threads
Thread Thread Starter Forum Replies Last Post
VB Scripting namitas Visual Basic 2008 Professionals 0 June 12th, 2008 08:58 AM
Scripting depesh Beginning VB 6 2 January 5th, 2005 04:35 PM
Safe For Scripting interrupt VBScript 0 September 2nd, 2004 07:25 AM
Using more than one scripting language aadz5 ASP.NET 1.0 and 1.1 Basics 1 November 8th, 2003 02:41 PM
Scripting Tables Walden SQL Server 2000 2 June 5th, 2003 06:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.