Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
s_mccoy #1
response.write URL
I have a page which lists conferences and events which the company for which I
coded the site attends or hosts themselves. They want to be able to continue
to list the conferences and events after the date but they want the link
removed. I've been able to get an if then else to filter out the links but I
can't get the link properly written into the page using response.write. The
quotation marks for the HTML attributes are interfering with the quotation
marks for the server side call for the URL listed in the database. I've
attached the code I've got partially working below. If anyone has any ideas as
to how I might fix this code or perhaps a better approach to the problem I'd
appreciate it.
<td><h3><span
class="green_hghlt"><%=(rs_conferences.Fields.Item ("confDate").Value)%> -
<%=(rs_conferences.Fields.Item("confLocation").Val ue)%></span><br />
<span
class="blue_hghlt"><%=(rs_conferences.Fields.Item( "confTitle").Value)%></span></
h3>
<p><%=(rs_conferences.Fields.Item("confSummary").V alue)%></p>
<% if rs_conferences.Fields.Item("confLink").Value <> " " then
Response.Write "<div id=" & "css_button" & "><p><a href=" &
"(rs_conferences.Fields.Item(" & "confLink" & ").Value)" & " target=" &
"_blank" & " class=" & "link_highlight" & ">sign up for the
conference...</a></p></div>"
end if %>
</td>
s_mccoy Guest
-
If response.write help
Hi, I am trying to code my asp page so that if you are on page Y, the link to page Y in the nav, is in the over state to help users identify where... -
quotes in response.write
Hi there, I want to do: response.write("bla bla bla "in quotes" bla bla") How do I show the quotes on the screen in asp like I have to do \"... -
Response.Write not working
Hello, in my ASP.NET c# project I can ouput text using response.write from the code behind class. It works in the aspx file using <asp:TextBox>... -
Response.Write and Response.Redirect
On my Page_Load event, i need to do some validation and then either let them proceed, or display a error message and boot them back to the previous... -
asp response.write doesn't display
Maybe you could start with a more barebones file, especially one without an unclosed LINK tag: -
-
s_mccoy #3
Re: response.write URL
*bump* I really gotta get his issue resolved. Does no one know how to do this?
s_mccoy Guest
-
Michael Fesser #4
Re: response.write URL
..oO(s_mccoy)
I'm not familiar with ASP, so this is just a wild guess ...>[...] The
>quotation marks for the HTML attributes are interfering with the quotation
>marks for the server side call for the URL listed in the database. I've
>attached the code I've got partially working below. If anyone has any ideas as
>to how I might fix this code or perhaps a better approach to the problem I'd
>appreciate it.
[...]
Response.Write "<div class='css_button'><a href='" &
rs_conferences.Fields.Item("confLink").Value &
"' target='_blank'>sign up for the conference</a></div>"
[...]
Three additional changes I made:
* 'css_button' should most likely be a class, not an ID as it was in
your code (an ID has to be unique throughout a document).
* The paragraph inside of the div is not necessary, styling can be
applied with the class 'css_button'.
* The class 'link_highlight' can most likely be removed. If you have to
style the link you can do it in your CSS with
.css_button a {...}
And I would also remove the target attribute, because opening new
windows sucks. But that's just my personal opinion.
HTH
Micha
Michael Fesser Guest
-
s_mccoy #5
Re: response.write URL
Micha,
It turns out that the first div is not necessary. I think it was left behind
when I rewrote the way the buttons worked to fix another issue elsewhere on the
site. I still need the <p> tag to force that particular button to sit where it
does. If I pad the button it breaks buttons elsewhere on the site. Either
way, after doing a little clean up it didn't resolve my issue with the dynamic
a href (no surprise there). Thanks for your reply though.
s_mccoy Guest
-
s_mccoy #6
Re: response.write URL
Never mind, problem solved. If anyone runs across this issue, you have to
declare the recordset as a variable and call the variable. if you try to call
the recordset twice, asp will ignore the second call. If you use a variable it
only makes the connection once and reuses the value wherever you need to. In
the case above I simply added <blockquote> confLinkURL =
(rs_conferences.Fields.Item("confLink").Value)</blockquote>and replacced all
instances of (rs_conferences.Fields.Item("confLink").Value) with confLinkURL.
s_mccoy Guest



Reply With Quote

