SayItAintSo
05-21-2009, 07:08 PM
I need this bookmarklet (below) to open in a new window and display the info there. It needs to work in both FF and IE. It would be in one line in the bookmarklet but I expanded it for readability. It should work against our site:www.mysanantonio.com (http://www.mysanantonio.com)
javascript:
var adBookmarkletData=[];
adBookmarkletData.push('<html><head><title>MYSA Yahoo! APT Debugger</title></head><body><center><div style=\"background:#ccc;color:#000;width:350px;text-align:left;padding:15px;border:2px #000;\">');
adBookmarkletData.push('<b>MYSA Yahoo! APT Debugger:</b><br /><hr />');
adBookmarkletData.push('<b>URL:</b> '+document.location.href+'<br />');
adBookmarkletData.push('<b>Pub ID:</b> '+window.yld_mgr.pub_id+'<br />');
adBookmarkletData.push('<b>Site Name:</b> '+window.yld_mgr.site_name+'<br />');
adBookmarkletData.push('<b>Content Topic ID List:</b> '+window.yld_mgr.content_topic_id_list+'<br />');
adBookmarkletData.push('<b>Site Section Name List:</b> '+window.yld_mgr.site_section_name_list+'<br />');
for(i in window.yld_mgr.slots){
adBookmarkletData.push('<b>AD:</b> ('+i+') <b>Category:</b>('+window.yld_mgr.slots[i].cstm_content_cat_list+')<br />');
};
adBookmarkletData.push('</div></center></body></html>');
function createAptDebugger(){
for (i in adBookmarkletData){document.write(adBookmarkletData[i]);}
};
void(createAptDebugger());
This had been suggested and I tried it but it only opens an empty window in IE and an empty tab in FF. I need it to open a new window in both:
This did not work:
var adBookmarkletData=[
'<html><head><title>MYSA Yahoo! APT Debugger</title></head><body><center><div style=\"background:#ccc;color:#000;width:350px;text-align:left;padding:15px;border:2px #000;\">',
'<b>MYSA Yahoo! APT Debugger:</b><br /><hr />',
'<b>URL:</b> '+document.location.href+'<br />',
'<b>Pub ID:</b> '+window.yld_mgr.pub_id+'<br />',
'<b>Site Name:</b> '+window.yld_mgr.site_name+'<br />',
'<b>Content Topic ID List:</b> '+window.yld_mgr.content_topic_id_list+'<br />',
'<b>Site Section Name List:</b> '+window.yld_mgr.site_section_name_list+'<br />'];
for(i in window.yld_mgr.slots){
adBookmarkletData.push('<b>AD:</b> ('+i+') <b>Category:</b>('+window.yld_mgr.slots[i].cstm_content_cat_list+')<br />');
};
adBookmarkletData.push('</div></center></body></html>');
function createAptDebugger(){
var pu=window.open("");
pu.onload=function(){
pu.document.write(adBookmarkletData.join(""));
}
};
void(createAptDebugger());
I've been trying different things but no joy. Thank in advance for looking at this,
Regards,
javascript:
var adBookmarkletData=[];
adBookmarkletData.push('<html><head><title>MYSA Yahoo! APT Debugger</title></head><body><center><div style=\"background:#ccc;color:#000;width:350px;text-align:left;padding:15px;border:2px #000;\">');
adBookmarkletData.push('<b>MYSA Yahoo! APT Debugger:</b><br /><hr />');
adBookmarkletData.push('<b>URL:</b> '+document.location.href+'<br />');
adBookmarkletData.push('<b>Pub ID:</b> '+window.yld_mgr.pub_id+'<br />');
adBookmarkletData.push('<b>Site Name:</b> '+window.yld_mgr.site_name+'<br />');
adBookmarkletData.push('<b>Content Topic ID List:</b> '+window.yld_mgr.content_topic_id_list+'<br />');
adBookmarkletData.push('<b>Site Section Name List:</b> '+window.yld_mgr.site_section_name_list+'<br />');
for(i in window.yld_mgr.slots){
adBookmarkletData.push('<b>AD:</b> ('+i+') <b>Category:</b>('+window.yld_mgr.slots[i].cstm_content_cat_list+')<br />');
};
adBookmarkletData.push('</div></center></body></html>');
function createAptDebugger(){
for (i in adBookmarkletData){document.write(adBookmarkletData[i]);}
};
void(createAptDebugger());
This had been suggested and I tried it but it only opens an empty window in IE and an empty tab in FF. I need it to open a new window in both:
This did not work:
var adBookmarkletData=[
'<html><head><title>MYSA Yahoo! APT Debugger</title></head><body><center><div style=\"background:#ccc;color:#000;width:350px;text-align:left;padding:15px;border:2px #000;\">',
'<b>MYSA Yahoo! APT Debugger:</b><br /><hr />',
'<b>URL:</b> '+document.location.href+'<br />',
'<b>Pub ID:</b> '+window.yld_mgr.pub_id+'<br />',
'<b>Site Name:</b> '+window.yld_mgr.site_name+'<br />',
'<b>Content Topic ID List:</b> '+window.yld_mgr.content_topic_id_list+'<br />',
'<b>Site Section Name List:</b> '+window.yld_mgr.site_section_name_list+'<br />'];
for(i in window.yld_mgr.slots){
adBookmarkletData.push('<b>AD:</b> ('+i+') <b>Category:</b>('+window.yld_mgr.slots[i].cstm_content_cat_list+')<br />');
};
adBookmarkletData.push('</div></center></body></html>');
function createAptDebugger(){
var pu=window.open("");
pu.onload=function(){
pu.document.write(adBookmarkletData.join(""));
}
};
void(createAptDebugger());
I've been trying different things but no joy. Thank in advance for looking at this,
Regards,