I am really eager to know , is there any API or way to achieve this.I want to get Source code generated by the Browser.
In below code initial CSS Class
of colorElement is redFontClass
but onload javascript done changes to blueFontClass
.Which is very clear using the Firebug.I want to get this kind of Response using URL calling in Java. Is this possible ?.I don't want any of the Javascript but want finally browser generated HTML with CSS which is very useful for Flying-Saucer kind of PDF generators.They are not supporting for the Javascripts for time being.
Real HTML :
<html>
<head>
<style>
.redFontClass
{
color : red;
}
.blueFontClass
{
color : blue;
}
</style>
<script language="javascript">
function changeColor()
{
document.getElementById('colorElement').className='blueFontClass';
alert("asdfsd");
}
</script>
</head>
<body onload="javascript:changeColor();">
<b>This Should come as <span class = "redFontClass" id="colorElement">Red</span> </b>
</body>
</html>
FireFox Firebug Image :
Update : I need the Browser generated HTML if I call the URL of that particular file. Because I will call this from server side Java Code not using any clinet side applications like Browsers.
Browser Generated HTML :
<html><head>
<style>
.redFontClass
{
color : red;
}
.blueFontClass
{
color : blue;
}
</style>
<script language="javascript">
function changeColor()
{
document.getElementById('colorElement').className='blueFontClass';
alert("asdfsd");
}
</script>
</head>
<body onload="javascript:changeColor();">
<b>This Should come as <span id="colorElement" class="blueFontClass">Red</span> </b>
</body></html>