Hi There
I am trying to capture html
<title></title>
and Metadata
from with in a form1
but not exactly sure how to do it...
My quess is to do it like: document.write(document.form1.title);
or document.write.texteara.(document.form1.title);
but this is not working for me...
<textarea name="textarea" id="textarea" cols="45" rows="5"><title>This is the title tag extracted</title><meta name="keywords" content="test 1, test 2, test3" /></textarea>
</label>
</form>
<script type="text/javascript" src="<%= g_page_site_actual %>/js/jquery-1.4.2.min.js"></script>
<script language="JavaScript"><!--
if (document.getElementsByName) {
var metaArray = document.getElementsByName('Author');
for (var i=0; i<metaArray.length; i++) {
document.write(metaArray[i].content + '<br>');
}
var metaArray = document.getElementsByName('Description');
for (var i=0; i<metaArray.length; i++) {
document.write(metaArray[i].content + '<br>');
}
var metaArray = document.getElementsByName('Keywords');
for (var i=0; i<metaArray.length; i++) {
document.write(metaArray[i].content + '<br>');
}
}
document.write(document.form1.title);
//--></script>
Any ideas how I can capture the metadata from within a textarea?