Click to See Complete Forum and Search --> : variables


flashgroover
09-04-2003, 12:35 PM
hello all,

this is the important part of my script:

-----------------------------------------

function matrix(){

browserVersion = 'idf_loader.htm';
f = browserVersion;
document.write('<a href="javascript:launchCenter('+f+');">High</a>');

}

('+f+') only see's 'idf_loader'
not the '.htm'
the dot is killing it?

why o masters of coding?

Khalid Ali
09-04-2003, 12:38 PM
use something like this

document.write('<a href="javascript:launchCenter("'+f+'");">High</a>');

flashgroover
09-04-2003, 12:46 PM
("'+f+'")
this gives a syntax error. the double quotes kill it
thanks though

Fang
09-04-2003, 02:21 PM
document.write('<a href="javascript:launchCenter(&quot; '+f+' &quot;);">High</a>');

pcolafl
09-04-2003, 02:21 PM
function matrix(){

browserVersion = 'idf_loader.htm';
f = browserVersion;
document.write('<a href=&.quot;javascript:launchCenter(&.quot;' +f+ '&.quot;);&.quot;>High</a>');

}

Remove the .dot from &.quot;

Fang
09-04-2003, 02:26 PM
What we are tring to show is extended characters.
surround the '+f+' with ex.char. of " & quot ;