This topic is locked

IMG and A tag links being replaced wth full string

7/19/2005 11:39:43 AM
ASPRunnerPro General questions
garydee author

Sergey - this is not an error but more of a unwanted feature/bug of a type in the code.
I'm using the update forms to update memo fields in my access database that holds html for different pages.
However, if I've got code like the following for example:
<IMG height=5 src="images/spacer.gif" width=5>
and i make a change in the text or something and press SAVE
it replaces it with the following when im testing:
<IMG height=5 src="https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=1649&image=1&table=forumtopics"; width=5>
Hence filling in the full string.
This is not a good thing as when it goes live there will be loads of broken links.
(PS Im using the rich text feature to update the memo field)
Is there a way to stop this from occurring - either through the menu options when im building the files - or in the code or include files???
Your help is much appreciated.
Cheers
Garydee

A
annayevs 7/19/2005

I had a related issue. I was displaying a list of links, internally, and the links were pointing to network drives. The string that was by default had http://blahblahblah. I modified the code to look like this:

if InStr(1,Left(str,7),"://")=0 and Left(str,7)<>"mailto:" then str = "" & str

GetHyperlink = "<a href=""" & str & """" & Target & "target = _blank"& ">" & strTitle & "</a>"



With this, am able to save changes to the records

Hope this gives you an idea.
Anna

P.S. I also added the

"target = _blank"

b/c that's what I needed.

garydee author 7/20/2005

Thanks Anna - still confused tho
What page did you make these changes - and was it new code you put in or did you amend some of the page code already there?
Thanks a million
Gareth

Sergey Kornilov admin 7/20/2005

Garydee,
some clarification is required.
Does Rich Text Editor replaces relative URL with absolute when you click Save?

Some screenshot can help a lot.
To Anna: in ASPRunnerPro 3.2 you can specify any custom URL prefix like file:// or \\server. Also you can open link in new window. You can do this on the Formatting tab in ASPRunnerPro.

garydee author 7/20/2005

Hi Sergey - thanks for getting back to me
See attached screenshots - ive just noticed that its actually when you click 'view source' then unclick and then click it again that it changes the urls - the screenshots show you exactly what I mean.
So if I click into the source to make a change and then save - then it amends the url strings to that seen in screenshot 3.
Know what I mean?
Thanks a million
Gareth






Hope this is clear to people who may find they are having the same prob
Cheers
G

500299 7/20/2005

Hi Gareth,

To answer your question, I modified file _aspfunctions.asp in the include folder. For me, the lines I modified are about line 1290 or so. It could be different for you.
Hope this helps,

Anna

500300 7/20/2005

To Anna: in ASPRunnerPro 3.2 you can specify any custom URL prefix like file:// or \\server. Also you can open link in new window. You can do this on the Formatting tab in ASPRunnerPro.



Thanks Sergey,

I had the earlier version. I will have to try it in 3.2 now.
Thanks,

Anna