ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 29th, 2009, 04:33 PM
SenTnel SenTnel is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2007
Posts: 4 SenTnel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 58 m 7 sec
Reputation Power: 0
Layout design problem

Hi!

We use an .ASP article publishing software and works very good, but has some limitations that we would like to get around it. This is the problem: The script publishes the article's image, headline abd summary alltogether, no space in between, there's no control as far as padding between the image and the text, etc., to find a workaround we substituted the following line in the original script:

articlelist=articlelist &thisimage&"<b>"&rs("headline")&"</b>" & closetag & "</font>"

for this:

table_new="<table width='100%"&"' border='0"&"' cellspacing='5"&"' cellpadding='0"&"'><tr><td>&thisimage&</td><td><b>&rs("headline")&</b></td></tr></table>"
articlelist=articlelist &table_new & closetag & "</font>"

to try to split the output in a table, so we can beside other things like applying css styles, control de output's looks, but there's something here that is not working, while it does the job of displaying the news the way we want the link doesn't work, I mean, you can see the link, it takes the css a: link property, when you hover over the text the color changes, but the cursor never changes to a hand, and when you click on it nothing happens, by looking at it, can you tell what's wrong with our "workaround"?

Thanks !


P.D.: Below IŽll include the original .asp in case you need more to look at, the lines we are refering to starts at 155

sample.asp:




Code:
<!-- #include file="configdata.asp" --> <!-- #include file="databasedata.asp" --> <!-- #include file="incGetThumbnail.asp" --> <!-- #include file="incCache.asp" --> <% response.buffer=true response.flush zoneid=request("z") if instr(zoneid,"$")<>0 or zoneid="" then response.end nocache=request("nocache") fdate=request("fdate") if fdate<>"" then zonecache=""  '/// Check Protection /// callingurl=lcase(Request.ServerVariables("HTTP_REFERER")) if zoneprotection<>"any" and instr(callingurl,lcase(applicationurl))=0 and callingurl<>"" then 	specialurls=split(lcase(specialurls),";") 	for x=0 to ubound(specialurls) 		if len(specialurls(x))>5 then 			if instr(specialurls(x),"http://")=0 then specialurls(x)="http://"&specialurls(x) 			if instr(callingurl,specialurls(x))=1 then  				takeaction=true 				exit for 			end if 		end if 	next 	if zoneprotection="restricted" and takeaction=false then response.end 	if zoneprotection="banned" and takeaction=true then response.end end if  '/// Zone Cache  /// if zonecache<>"" then 	dim resultfile 	resultfile="" 	call getcache("zone",nocache) end if  '//// Override Default Parameters  articlespz=request("h")			'Number of headlines 0-Unlimited showsummary=request("ss")		'Show Summary Y,N showsource=request("sc")		'Show Source Y,N showdates=request("sd")			'Show Dates Y,N showtn=request("st")			'Show Thumbnail Y,N displayhoriz=request("d")		'Display V-Vertical, H-Horizontal textalign=request("al")			'Align cellcolor=request("cc")			'Cell Color targetframe=request("target")	'Targetframe zonefont=request("font")		'Font fontcolor=request("color")		'Font Color fontsize=request("size")		'Font Size isarchive=request("isarchive")	'List only Archives stdate=request("stdate")		'With Start Date Like edate=request("edate")			'With End Date Like pdate=request("pdate")			'With Posted Date Like hdate=request("hdate")			'With Headline Date Like sort=request("sort")			'Sorting Criteria ord=request("ord")				'Order (asc,desc)   today=year(now)&"/"&right("0"&month(now),2)&"/"&right("0"&day(now),2) if fdate<>"" then today=fdate  psql="select * from vArticlesZones where " if isnumeric(zoneid) then  	psql=psql & "zoneid="&zoneid else 	psql=psql & "zonename='"&zoneid&"'" end if  if isarchive="" or isarchive="n" then psql=psql &" and status=1 " else psql=psql & "and status=4"  if stdate="" and edate="" and pdate="" and hdate="" then 	psql=psql & " and startdate<='"&today&"' and (enddate>='"&today&"' or enddate='-')" else 	if stdate<>"" then psql=psql & " and startdate like '"&stdate&"%'" 	if edate<>"" then psql=psql & " and enddate like '"&edate&"%'" 	if pdate<>"" then psql=psql & " and posted like '"&pdate&"%'" 	if hdate<>"" then psql=psql & " and headlinedate like '"& hdate & "%'" end if  if sort<>"" then psql=psql & "order by "&sort else psql=psql & " order by startdate  " if ord<>"" then psql=psql & " " & ord  set conn=server.createobject("ADODB.Connection") conn.open connection set rs=conn.execute(psql) if rs.eof then  	if nonewsmessage<>"" then articlelist="<div align=center><br>"&nonewsmessage&"<br>&nbsp;</div>" else articlelist="" else 	'/// Headlines Per Zone 	if articlespz<>"" then 		articlespz=cint(articlespz) 	else 		articlespz=rs("articlespz") 	end if 	 	'/// Display Summary 	if showsummary="" then 		showsummary=rs("showsummary") 	elseif showsummary="n" then 		showsummary="" 	end if 	 	'/// Display Source 	if showsource="" then 		showsource=rs("showsource") 	elseif showsource="n" then 		showsource="" 	end if 	 	'/// Display Dates 	if showdates="" then 		showdates=rs("showdates") 	elseif showdates="n" then 		showdates="" 	end if 	 	'/// Display Thumbnail 	if showtn="" then 		showtn=rs("showtn") 	elseif showtn="n" then 		showtn="" 	end if 	 	'/// Display Articles Horizontally 	if displayhoriz="" then 		displayhoriz=rs("displayhoriz") 	elseif displayhoriz="v" then 		displayhoriz="" 	end if 	 	if zonefont="" then zonefont=rs("zonefont") 	if fontsize="" then fontsize=rs("fontsize") 	if fontcolor="" then fontcolor=rs("fontcolor") 	if fontcolor<>"" then fontcolor=" fontcolor='"&fontcolor&"'" 	if targetframe="" then targetframe=rs("targetframe") 	if targetframe<>"" then target=" target='"&targetframe&"'" else target="" 	if textalign="" then textalign=rs("textalign") 	if cellcolor="" then cellcolor=rs("cellcolor") 	if cellcolor<>"" then cellcolor=" bgcolor='"&cellcolor&"'" 	 	do until rs.eof 		closetag="" 		summary=rs("summary")&"" 		sumary=server.htmlencode(summary) 		if rs("articleurl")<>"" and openexternal<>"" then thistarget="target=_blank"  else thistarget=target 		c=c+1 		if rowmade="" or displayhoriz="" then articlelist=articlelist & "<tr>" 		if displayhoriz<>"" then rowmade="1" 		articlelist=articlelist & "<td align='"&textalign&"' width=[WIDTH] left valign=top "&cellcolor&">" 		if showtn<>"" then thisimage=gettnimage(rs("articleid"),textalign) else thisimage="" 		articlelist=articlelist & "<font face='"&zonefont&"' size='"&fontsize&"'"&fontcolor&">" 		if rs("article")<>"" or rs("articleurl")<>"" then articlelist=articlelist & "<a href='"&applicationurl&"anmviewer.asp?a="&rs("articleid")&"&z="&zoneid&"'"&thistarget&">" : closetag="</a>"  		articlelist=articlelist &thisimage&"<b>"&rs("headline")&"</b>" & closetag & "</font>"  		if showdates<>"" and rs("headlinedate")<>"" then articlelist=articlelist & "<br><font face='"&zonefont&"' size='"&fontsize&"'"&fontcolor&"><i>"&rs("headlinedate")&"</i></font>" 		if showsource<>"" and rs("source")<>"" then articlelist=articlelist & "<br><font face='"&zonefont&"' size='"&fontsize&"'"&fontcolor&"><i>"&rs("source")&"</i></font>" 		if showsummary<>"" and summary<>"" then articlelist=articlelist & "<br><font face='"&zonefont&"' size='"&fontsize&"'"&fontcolor&">"&replace(summary,vbcrlf,"<br>")&"</font>" 		if readmore<>"" then articlelist=articlelist &"<br><font face='"&zonefont&"' size='"&fontsize&"'"&fontcolor&">" 		if closetag<>"" then articlelist=articlelist & "<a href='"&applicationurl&"anmviewer.asp?a="&rs("articleid")&"&z="&zoneid&"'"&thistarget&">"&readmore&"</a>" 		articlelist=articlelist &"</font>" 		articlelist=articlelist&"</td>" 		if displayhoriz="" then articlelist=articlelist & "</tr>" 		rs.movenext 				 		'/// Display Limited Articles ? 		if articlespz>0 and c>=articlespz then exit do 	loop  	'/// Get Appropiate Cell Width 	width="100%" 	if displayhoriz<>"" then  		if c=0 then c=1 		articlelist=articlelist & "</tr>" 		width=int(100/c)&"%" 	end if 	articlelist=replace(articlelist,"[WIDTH]",width)  	articlelist="<table width=100% cellspacing=1 cellpadding=3 border=0>"&articlelist&"</table>"  end if rs.close set rs=nothing conn.close set conn=nothing  articlelist=replace(articlelist,"\","\\") articlelist=replace(articlelist,"/","\/") articlelist=replace(articlelist,vbclrf,"\n") articlelist=replace(articlelist,chr(34),"\"&chr(34)) articlelist=replace(articlelist,"'","\'") articlelist="document.write('"&articlelist&"');"  '/// Do Cache ? /// if zonecache<>"" and resultfile<>"" then call writecache(resultfile,articlelist)  response.write articlelist response.end %>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Layout design problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
Stay green...Green IT