how to create hyperlink in Html page using Java
Hello every one
I want to know that how can I create a hyperlink in Html page using java ?
Let for example
I have code like this and i want to give hyperlink to it using java.
rember that i am creating node using this id="name" which give me multiple value. and i want to assign diff link to each name..?
<tr>
<td ><span id="name"></span>
</tr>
[424 byte] By [
Dhruvanga] at [2007-11-27 9:12:35]

> I want to know that how can I create a hyperlink in
> Html page using java ?
fileWriter.write("<a href="url://whatever">Linkname</a>");
> Let for example
> I have code like this and i want to give hyperlink to
> it using java.
> rember that i am creating node using this id="name"
> which give me multiple value. and i want to assign
> diff link to each name..?
Huh?
but i m using this code to create node in html file
HTMLLIElement li = (HTMLLIElement)appHTML.createElement("LI");
Text txt = appHTML.createTextNode(name);
li.appendChild(txt);
appHTML.getElementById("name").appendChild(li);
this will display all name value which is coming from database,
and i want to assign a hyperlink to it,
I have id with name also so I thought that using id i will
create javascript like
function popup(id)
{
if(id==1)
{
var n1 = window.open("../list/name1.html");
}
if(id==2)
{
var n1 = window.open("../list/name2.html");
}
}
this way i want to popup particular file if i can pass id value in this function
so want hyperlink like
<a href="#" onclick="javascript:popup()" >name</a>