hi there, I am about to give up on this, so I really hope someone can help me out. thanks
MY INTENTION:
I have a table listing a collection of articles available in an XML file. By clicking on the row, the user should be able to email a specific user, with the article title inserted in the email.
SO FAR:
I have an HTML file that loads the XML and XSL files.
The xsl file display the table pretty nicely. When the user clicks on the appropriate row, a javascript calls and displays the information on the email, however a second javascript that is expected to display the actual selected article title (from the XML file) in the message body does not work.
It comes back with: [undefined]instead of the article title.
PROBLEM:
It seems to me that it is not recognising the object I am intending to access.
Any ideas?
Thanks
The table row in the XSL document:
<td onclick="mailkn()"><xsl:value-of select="TOPIC"/></td>
Typing the info on the Mail program:
function mailkn()
{
var vEmail = "kn@mail.com"
var vSubject = "Article details"
var vBody = "Can i have a copy of: " + testclick(this)
document.location = "mailto:" + vEmail + "?subject=" + vSubject + "&body=" + vBody
}
Getting the information from the appropriate ELEMENT on the XML File:
function testclick(field)
{
var row=field.parentElement.rowIndex
future_tb.recordset.absoluteposition=row
return(future_tb.recordset("TOPIC")
}
MY INTENTION:
I have a table listing a collection of articles available in an XML file. By clicking on the row, the user should be able to email a specific user, with the article title inserted in the email.
SO FAR:
I have an HTML file that loads the XML and XSL files.
The xsl file display the table pretty nicely. When the user clicks on the appropriate row, a javascript calls and displays the information on the email, however a second javascript that is expected to display the actual selected article title (from the XML file) in the message body does not work.
It comes back with: [undefined]instead of the article title.
PROBLEM:
It seems to me that it is not recognising the object I am intending to access.
Any ideas?
Thanks
The table row in the XSL document:
<td onclick="mailkn()"><xsl:value-of select="TOPIC"/></td>
Typing the info on the Mail program:
function mailkn()
{
var vEmail = "kn@mail.com"
var vSubject = "Article details"
var vBody = "Can i have a copy of: " + testclick(this)
document.location = "mailto:" + vEmail + "?subject=" + vSubject + "&body=" + vBody
}
Getting the information from the appropriate ELEMENT on the XML File:
function testclick(field)
{
var row=field.parentElement.rowIndex
future_tb.recordset.absoluteposition=row
return(future_tb.recordset("TOPIC")
}