Hi,
I am trying to call javascript function from auto generated content same as the sample.
I have this css file
I have this javascript file
I have this html
but neither my top of the page has the datetime or my paragraph colored in black
My input is
hello in red
I have this c# code as well
prn.AddScript("C:\\PrinceXML\\Prince.js");
prn.AddStyleSheet("C:\\PrinceXML\\Prince.css");
I tried swiping adding CSS before JS but it is not working
The log info is
Mon Jul 8 16:58:38 2013: ---- begin
Mon Jul 8 16:58:38 2013: Loading document...
Mon Jul 8 16:58:38 2013: Running scripts...
Mon Jul 8 16:58:38 2013: Applying style sheets...
Mon Jul 8 16:58:38 2013: Preparing document...
Mon Jul 8 16:58:38 2013: Converting document...
Mon Jul 8 16:58:38 2013: warning: unknown script function "datestamp", register with Prince.addScriptFunc
Mon Jul 8 16:58:38 2013: finished: success
Mon Jul 8 16:58:38 2013: ---- end
Any Help is appreciated.
Thanks/
I am trying to call javascript function from auto generated content same as the sample.
I have this css file
@page {
@top {
content: prince-script(datestamp)
}
}
p{
color :red;
}
I have this javascript file
function datestamp()
{
return (new Date()).toString();
}
I have this html
<!DOCTYPE html>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
</title>
</head>
<body>
<p id='a'>hello</p>
<script>
documnet.getElementByid('a').style.color = 'black'; \\ this not working
</script>
</body>
</html>
but neither my top of the page has the datetime or my paragraph colored in black
My input is
hello in red
I have this c# code as well
prn.AddScript("C:\\PrinceXML\\Prince.js");
prn.AddStyleSheet("C:\\PrinceXML\\Prince.css");
I tried swiping adding CSS before JS but it is not working
The log info is
Mon Jul 8 16:58:38 2013: ---- begin
Mon Jul 8 16:58:38 2013: Loading document...
Mon Jul 8 16:58:38 2013: Running scripts...
Mon Jul 8 16:58:38 2013: Applying style sheets...
Mon Jul 8 16:58:38 2013: Preparing document...
Mon Jul 8 16:58:38 2013: Converting document...
Mon Jul 8 16:58:38 2013: warning: unknown script function "datestamp", register with Prince.addScriptFunc
Mon Jul 8 16:58:38 2013: finished: success
Mon Jul 8 16:58:38 2013: ---- end
Any Help is appreciated.
Thanks/
Edited by mikeday