problem with DisplayHttpLink

Pertex
I have a problem with these two commands in Q5.2.

 x= DisplayHttpLink("RockyBeach","www.rocky-beach.com",  false) 
x=DisplayMailtoLink("link", "[email protected].de")


Both commands return

Error running script: Error compiling expression 'DisplayHttpLink("RockyBeach","www.rocky-beach.com", 0)': Der Wert darf nicht NULL sein. Parametername: key

Error running script: Error compiling expression 'DisplayMailtoLink("link", "[email protected].de")': Der Wert darf nicht NULL sein. Parametername: key


Any ideas?

Alex
Those functions don't return a value, they output directly. So you can't set "x" to their return value.

Pertex
Ah yes. Would it be ok that I add two functions returning a string?

Alex
Why do you need the string returned? You can always just manually put an <a> tag into your string anyway if you need to.

jaynabonne
If I can chime in... I guess it depends on how "user friendly" an interface you want to provide for novice or non-technical users. If the idea is to provide convenient wrapping functions so that someone who is not technically savvy (say) doesn't need to know all the HTML tags, then having a function like "GetHttpLink" would be a nice "cushion".

Along the lines of what Pertex is asking, I could see it broken down like this:

1) GetHttpLink returns a string with the encoded link.
2) DisplayHttpLink would just call GetHttpLink and pass it to msg... if you even need it.

To be honest, I can see a good use for GetHttpLink, but I can't even imagine a case where I'd ever want to dump out a link on a single line by itself (which is the drawback to "msg" enforcing a line break). I'd prefer the Get over the Display any day as a general function. And, again my opinion, if the idea is that people should be switching to using tags for links in most normal cases anyway, and given the highly limited utility of DisplatHttpLink as is, I think if you don't want to put in GetHttpLink functionality, you might as well get rid of DisplayHttpLink, as its counter to this more HTML-centric direction, and it's almost useless as it exists now.

Just my two cents... :)

Pertex
then there are now 4 cents :D

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums