The SAS Output Delivery System and reporting techniques

ods tagsets, sas/graph java applet, and document.writeln

Accepted Solution Solved
Reply
Regular Contributor
Posts: 182
Accepted Solution

ods tagsets, sas/graph java applet, and document.writeln

hi,

ODS generates the following html for my vbar chart with goptions device=java:

<script language="javascript" type="text/javascript">

<!--

   document.writeln("<OBJECT");

   document.writeln('style=" width: 640px; height: 480px; background-color: #FDFBF3; border-width: 0px;"');

   document.writeln("ALIGN=\"baseline\" class=\"Graph\"");

if (_ie == true) {

   document.writeln("CLASSID=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\"");

   if (_ie64 == true) {

      document.writeln("CODEBASE=\"http://javadl.sun.com/webapps/download/AutoDL?BundleId=47155#Version=1,6,0,0\"");

   }

   else {

      document.writeln("CODEBASE=\"http://java.sun.com/update/1.6.0/jinstall-6u24-windows-i586.cab#Version=1,6,0,0\"");

   }

}

else {

   document.writeln("CODEBASE=\"http://javadl.sun.com/webapps/download/GetFile/1.6.0_24-b07/windows-i586/xpiinstall.exe\"");

   document.writeln("TYPE=\"application/x-java-applet;version=1.6\"");

}

   document.writeln(">");

//-->


the browser translates this to:

<object style="width: 640px; height: 480px; background-color: rgb(253, 251, 243); border-width: 0px;" class="Graph" codebase="http://javadl.sun.com/webapps/download/GetFile/1.6.0_24-b07/windows-i586/xpiinstall.exe" type="application/x-java-applet;version=1.6" align="bottom">

The document.writeln's are causing me problems since they don't get executed when inserted into a div by my ajax callback function.

In sas93 I found the code that generates this <object> tag in the phtml tagset, so I can change this to static html.

in sas913 I can't find it there, nor anywhere else. can anyone tell where this code comes from in sas913?

thanks, Bart


Accepted Solutions
Solution
‎05-17-2012 05:45 AM
Regular Contributor
Posts: 182

Re: ods tagsets, sas/graph java applet, and document.writeln

Dutch technical support pointed me to an updated ODS tagset (grphtags.tpl) which contains the document.writeln functions, on http://support.sas.com/kb/17/502.html

I removed the document.writeln functions and now the java graph works when inserted into a div by my ajax callback function.

The reason that document.writeln is used is to generate different html for Internet Explorer and other browsers.

My client uses Internet Explorer so my updated tagset generates html for IE only now.

View solution in original post


All Replies
SAS Super FREQ
Posts: 8,744

Re: ods tagsets, sas/graph java applet, and document.writeln

Hi:

  I think your best bet is working with SAS Tech Support on this one. I'm not sure what it is you want -- HTML without any <OBJECT> tags?? Or graphs without any interactivity? Have you tried using the JAVAIMG device??? It is very likely that between 9.1.3 and 9.3 changes were made in how the various graphing techniques interact with ODS. The big changes in FONTS and STYLES came with 9.2 and the big change with ODS GRAPHICS came in 9.3.

  I figure you have come across this already:

http://support.sas.com/documentation/cdl/en/graphref/64854/HTML/default/viewer.htm#p1f5ic671qk79wn12...

cynthia

Regular Contributor
Posts: 182

Re: ods tagsets, sas/graph java applet, and document.writeln

i want ODS to send the <object> string itself to the browser instead of sending document.writeln statements to the browser and having the browser write that out to an <object> string, because the browser will not do that if it is inserted dynamically into a <div> element.

i will ask tech support, thanks

Solution
‎05-17-2012 05:45 AM
Regular Contributor
Posts: 182

Re: ods tagsets, sas/graph java applet, and document.writeln

Dutch technical support pointed me to an updated ODS tagset (grphtags.tpl) which contains the document.writeln functions, on http://support.sas.com/kb/17/502.html

I removed the document.writeln functions and now the java graph works when inserted into a div by my ajax callback function.

The reason that document.writeln is used is to generate different html for Internet Explorer and other browsers.

My client uses Internet Explorer so my updated tagset generates html for IE only now.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 277 views
  • 0 likes
  • 2 in conversation