ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

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 February 28th, 2013, 02:53 PM
smaldark smaldark is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 3 smaldark User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 6 sec
Reputation Power: 0
Interpretting URLs

We have an old classic ASP application that pulls a URL from an MSSQL database and we've had people recently ask about the URL, when clicked, going to a relative path. So, we'd have a URL of http://ourdomain.com/db_url and of course that link wouldn't exist.

I need to fix that output to the browser window, so that if a user clicks the URL, it takes them to the actual URL.

What I have in place, that works is:

Code:
<%Dim strURL
strURL = objProfile.FieldValue("pro_url")
strURL = Replace(objProfile.FieldValue("db_url"),"http://","",1,1,1)
%>


Then to display, I have:

Code:
<a href="http://<%=Response.Write(strURL)%>" target="_new"><%=objProfile.TextField("db_url",Adminedit,,50,50)%></a>


So, that Replace function works perfect, but what I've run into now, is that I can no longer edit the URL from the web application.

Before this issue, I had this in place:

Code:
<a href="http://<%=objProfile.TextField("db_url",noedit,,50,50)%>" target=_new"><%=objProfile.TextField("db_url",Adminedit,,50,50)%></a>


This section,
Code:
<%=objProfile.TextField("db_url",noedit,,50,50)%>
when in edit mode, gives the user an editable field.

I've tried various forms and combinations to try and get the edit function back with no luck.

Is there a better way to do this? Or, is there a way to modify this so I can edit again?

Thanks
Scott

Reply With Quote
  #2  
Old February 28th, 2013, 05:06 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,237 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 14 h 50 m 19 sec
Reputation Power: 4445
This must be a problem with your application somewhere, asp doesn't have any built-in edit fields.
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

Reply With Quote
  #3  
Old March 1st, 2013, 08:11 AM
smaldark smaldark is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 3 smaldark User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 6 sec
Reputation Power: 0
Quote:
Originally Posted by Doug G
This must be a problem with your application somewhere, asp doesn't have any built-in edit fields.


Ok - that I'm not aware of. However, the original developers of the application used code to put editing in as a feature.

Thanks

Reply With Quote
  #4  
Old March 1st, 2013, 02:46 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,237 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 14 h 50 m 19 sec
Reputation Power: 4445
Review the code that generates the editable field. What is the objProfile object?

Reply With Quote
  #5  
Old March 1st, 2013, 03:05 PM
smaldark smaldark is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 3 smaldark User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 58 m 6 sec
Reputation Power: 0
Quote:
Originally Posted by Doug G
Review the code that generates the editable field. What is the objProfile object?


Doug - I was able to solve the issue just a bit ago.

Using the editing as designed, I set the application so that when a user is viewing the site, the URL does what it should.

Then, when in edit mode, I set that as an "else statement" with the edit parameters.

I'm going to review some of the admin-type pages so I can see how they set the application up to allow editing, etc.

Thanks for your assistance.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > Interpretting URLs

Developer Shed Advertisers and Affiliates



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

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


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap