BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
bheinsius
Lapis Lazuli | Level 10

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

1 ACCEPTED SOLUTION

Accepted Solutions
bheinsius
Lapis Lazuli | Level 10

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

3 REPLIES 3
Cynthia_sas
SAS Super FREQ

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

bheinsius
Lapis Lazuli | Level 10

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

bheinsius
Lapis Lazuli | Level 10

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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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