Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- Creating HREF with Java


lucy24 - 11:54 pm on Oct 12, 2012 (gmt 0)


I cant just have an anchor with a +n+

It doesn't have to stop there. That was just the starting example. In javaSCRIPT-- which seems to be what we're talking about-- you can happily do

mystring = 'somefixedtext' + variable1 + 'morefixedtext' + variable2 + 'stillmorefixedtext'

et cetera until the cows come home. Your variables can come from anywhere: pulled directly from inputs, or from the result of calculations, or something global that you've previously generated, et cetera again.

And once you've assembled the entire '<a href = "blablabla">anchortext</a>' package, you shove it into place.


Thread source:: http://www.webmasterworld.com/javascript/4507120.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com