HighDots Forums  

Closing line space in an ASP page

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Closing line space in an ASP page in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
adario27
 
Posts: n/a

Default Closing line space in an ASP page - 10-25-2005 , 01:59 PM






:confused; I've created an ASP page that gives names and addresses of
contacts. In the page is there anyway to close line space if the information in
a field is empty?

Name
Add1
Add2
City, State zip

Example is in some records Add2 is empty can the "City, State, Zip" line move
up to close the space?

Thanks much for your help
Amy


Reply With Quote
  #2  
Old   
Lionstone
 
Posts: n/a

Default Re: Closing line space in an ASP page - 10-25-2005 , 02:41 PM






Sure, it's easy. But since I have no idea what you're doing when you output
the addresses (line breaks, paragraphs, address tag, table cells), I have no
idea what to tell you.

"adario27" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
:confused; I've created an ASP page that gives names and addresses of
contacts. In the page is there anyway to close line space if the
information in
a field is empty?

Name
Add1
Add2
City, State zip

Example is in some records Add2 is empty can the "City, State, Zip" line
move
up to close the space?

Thanks much for your help
Amy




Reply With Quote
  #3  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Closing line space in an ASP page - 10-25-2005 , 02:42 PM



<% if (fieldname)&"A" <>"A" %>
<p>Blah</p>
<% endif %>

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"adario27" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
:confused; I've created an ASP page that gives names and addresses of
contacts. In the page is there anyway to close line space if the
information in
a field is empty?

Name
Add1
Add2
City, State zip

Example is in some records Add2 is empty can the "City, State, Zip" line
move
up to close the space?

Thanks much for your help
Amy




Reply With Quote
  #4  
Old   
adario27
 
Posts: n/a

Default Re: Closing line space in an ASP page - 10-25-2005 , 03:48 PM



Thank you Murray for your answer... I'm still a bit confused though sorry. If
I have would I put your code in add2, so that it looks like this <% if
("add2")&"A" <>"A" %> ?

<p>
<%=(mmpwAttendees.Fields.Item("Affiliation").Value )%><br>
<%=(mmpwAttendees.Fields.Item("Add1").Value)%><br>
<%=(mmpwAttendees.Fields.Item("Add2").Value)%><br>
<%=(mmpwAttendees.Fields.Item("City").Value)%></p>

Thank you for your help.
Amy


Reply With Quote
  #5  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Closing line space in an ASP page - 10-25-2005 , 03:54 PM



My reply was a bit truncated and a bit wrong. You would have to put the
recordset identification there too, e.g.,

<p>
<%=(mmpwAttendees.Fields.Item("Affiliation").Value )%><br>
<%=(mmpwAttendees.Fields.Item("Add1").Value)%><br>
<% if mmpwAttendees.Fields.Item("Add2").Value & "A" <>"A" %>
<%=(mmpwAttendees.Fields.Item("Add2").Value)%><br>
<% end if %>
<%=(mmpwAttendees.Fields.Item("City").Value)%></p>



--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"adario27" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Thank you Murray for your answer... I'm still a bit confused though sorry.
If
I have would I put your code in add2, so that it looks like this <% if
("add2")&"A" <>"A" %> ?

p
%=(mmpwAttendees.Fields.Item("Affiliation").Value) %><br
%=(mmpwAttendees.Fields.Item("Add1").Value)%><br
%=(mmpwAttendees.Fields.Item("Add2").Value)%><br
%=(mmpwAttendees.Fields.Item("City").Value)%></p

Thank you for your help.
Amy




Reply With Quote
  #6  
Old   
Lionstone
 
Posts: n/a

Default Re: Closing line space in an ASP page - 10-25-2005 , 04:35 PM



I think testing LEN(string) > 0 is probably better since VBScript is slow at
concatenation. LEN() returns 0 for both "" and NULL, so you should be good.


"Murray *TMM*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote

Quote:
My reply was a bit truncated and a bit wrong. You would have to put the
recordset identification there too, e.g.,

p
%=(mmpwAttendees.Fields.Item("Affiliation").Value) %><br
%=(mmpwAttendees.Fields.Item("Add1").Value)%><br
% if mmpwAttendees.Fields.Item("Add2").Value & "A" <>"A" %
%=(mmpwAttendees.Fields.Item("Add2").Value)%><br
% end if %
%=(mmpwAttendees.Fields.Item("City").Value)%></p



--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"adario27" <webforumsuser (AT) macromedia (DOT) com> wrote in message
news:djm26p$gbh$1 (AT) forums (DOT) macromedia.com...
Thank you Murray for your answer... I'm still a bit confused though
sorry. If
I have would I put your code in add2, so that it looks like this <% if
("add2")&"A" <>"A" %> ?

p
%=(mmpwAttendees.Fields.Item("Affiliation").Value) %><br
%=(mmpwAttendees.Fields.Item("Add1").Value)%><br
%=(mmpwAttendees.Fields.Item("Add2").Value)%><br
%=(mmpwAttendees.Fields.Item("City").Value)%></p

Thank you for your help.
Amy






Reply With Quote
  #7  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: Closing line space in an ASP page - 10-25-2005 , 04:48 PM



Good suggestion - thanks!

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"Lionstone" <HIDElionstone (AT) HIDEhushmail (DOT) com> wrote

Quote:
I think testing LEN(string) > 0 is probably better since VBScript is slow
at concatenation. LEN() returns 0 for both "" and NULL, so you should be
good.


"Murray *TMM*" <forums (AT) HAHAgreat-web-sights (DOT) com> wrote in message
news:djm2jd$gsj$1 (AT) forums (DOT) macromedia.com...
My reply was a bit truncated and a bit wrong. You would have to put the
recordset identification there too, e.g.,

p
%=(mmpwAttendees.Fields.Item("Affiliation").Value) %><br
%=(mmpwAttendees.Fields.Item("Add1").Value)%><br
% if mmpwAttendees.Fields.Item("Add2").Value & "A" <>"A" %
%=(mmpwAttendees.Fields.Item("Add2").Value)%><br
% end if %
%=(mmpwAttendees.Fields.Item("City").Value)%></p



--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"adario27" <webforumsuser (AT) macromedia (DOT) com> wrote in message
news:djm26p$gbh$1 (AT) forums (DOT) macromedia.com...
Thank you Murray for your answer... I'm still a bit confused though
sorry. If
I have would I put your code in add2, so that it looks like this <% if
("add2")&"A" <>"A" %> ?

p
%=(mmpwAttendees.Fields.Item("Affiliation").Value) %><br
%=(mmpwAttendees.Fields.Item("Add1").Value)%><br
%=(mmpwAttendees.Fields.Item("Add2").Value)%><br
%=(mmpwAttendees.Fields.Item("City").Value)%></p

Thank you for your help.
Amy








Reply With Quote
  #8  
Old   
webeebaby
 
Posts: n/a

Default Re: Closing line space in an ASP page - 11-02-2005 , 08:37 PM



use an if then else statement like this:

if add2 empty then
move next
else
blah blah blah

--
George Weidele
1301 Route 542
Egg Harbor City, NJ 08215
1-609-0197
"adario27" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
:confused; I've created an ASP page that gives names and addresses of
contacts. In the page is there anyway to close line space if the
information in
a field is empty?

Name
Add1
Add2
City, State zip

Example is in some records Add2 is empty can the "City, State, Zip" line
move
up to close the space?

Thanks much for your help
Amy




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.