View Full Version : changing display text in links dynamically

02-08-2005, 07:55 PM

I have a jsp page that is writing to an html file some variables. Now the value of one variable keeps changing due to somme function calls. I want this particular variable to be display text for an html link. Here is what I mean:

function WriteFile(getm)
var m =getm;
var fsol = new ActiveXObject('Scripting.FileSystemObject');
if (fsol.FileExists(textfilepath)) {
var a, ForAppending, file;
ForAppending = 8;
filel = fsol.OpenTextFile(textfilepath, ForAppending, false);
filel.WriteLine('<A HREF ="http://localhost:8080/IOC/home.jsp" target="_blank" >m</A>');
//The value of m displayed should be displayed here instead of the letter 'm'

which means if m=10 then the link should be created as 10
if m=20 thne link should be created as 20 etc..

Can this be done? What I want is not the same as the onmouseover event but I want the value of to be the display text.

Mr J
02-08-2005, 08:42 PM
See if the following works

filel.WriteLine('<A HREF ="http://localhost:8080/IOC/home.jsp" target="_blank" >'+m+'</A>');