Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New to asp--problem with code in Netscape

Status
Not open for further replies.

shellyk

Programmer
Mar 22, 2001
2
CA
Hi everyone
I'm new to asp and have developed code to create the code for a user to cut and paste for use in their web site to link to a specific map in our web application. The user must select their municipality from a drop down list, then their street from a list that is automatically generated based upon their municipality selection. Upon entering their street number they submit the form. The response then shows them the anchor code which they can cut and paste into their own site. Everything works great in IE, but in Netscape the anchor code flashes and then disappears. If you reload the page the anchor code appears and stays. If I look at the source code in NS, the line which I want to appear on the page is there, but as a regular link. Hope I haven't confused anyone. Anyhow here is the code I have used:

<P><STRONG>&lt;a HREF=&quot; <%dim strTwo
strTwo=strTwo & Request.Form(1) & &quot;%20&quot;
strTwo=strTwo & Request.Form(2) & &quot;,%20&quot;
strTwo=strTwo & Request.Form(3)
Response.Write(strTwo) %>
&quot;&gt; &lt;/a&gt;
</strong></P><BR>

What I want is for the user to get a page showing:

Copy the line of code below (Drag the mouse over the line of code to select it, then right click themouse and select &quot;Copy&quot;), and paste it in the desired position within your document (Right click the mouse and select 'Paste').
<a HREF=&quot; 677%20BIRCH_STREET,%20Collingwood &quot;> </a>

In this example 677 is Form(1); Birch_street is Form(2) and Collingwood is Form(3)


As I said it works great in IE, but not in NS (unless you reload the page). Any suggestions greatly appreciated.
 
I would try sticking this part of your code above the <head> tags of the page:
Code:
<%
dim strTwo 
strTwo=strTwo & Request.Form(1) & &quot;%20&quot; 
strTwo=strTwo & Request.Form(2) & &quot;,%20&quot; 
strTwo=strTwo & Request.Form(3) 
%>

And then just put the following for your link in the regular body of your page:
Code:
<P><STRONG><a HREF=&quot;[URL unfurl="true"]http://www.discoversimcoe.com/onpoint/default.asp?searchstring=<%=strTwo%>&quot;></a>[/URL]
</strong></P><BR>

Might help since the variable is already calculated, and then you're simply outputting it.

hope it helps! :)
Paul Prewett
 
Hi Paul
Thanks for your suggestion...but it didn't work :-(
When I tried your way, Netscape wouldn't show the output at all...even if I reloaded the page. So I went back to my code and found that if I took out the
</a>
the rest of the code worked fine in both NS and IE. I still would like to know how to do it the original way though, so if you have any other ideas let me know. I did go look for the escape characters to use in ASP and I am using the correct ones, but obviously not in the proper way.

Thanks again for your suggestion Paul.
Have a great day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top