Home » Fusion Middleware & Colab Suite » WebCenter Suite & Portal » Creating AJAX portlets in Oracle Portal (Portal 10.1.2)
Creating AJAX portlets in Oracle Portal [message #283652] Tue, 27 November 2007 20:36 Go to next message
Messages: 1
Registered: November 2007
Location: CA
Junior Member
I tried to place the following code inside an html portlet:

<script language="JavaScript" type="text/javascript">
var req

function loadURL(url)
if (window.XMLHttpRequest) {
req=new XMLHttpRequest()
else if (window.ActiveXObject) {
req=new ActiveXObject("Microsoft.XMLHTTP")
if (req!=null) {
else {
document.writeln("Cannot get URL status. Your browser does not support XMLHTTP.")

function state_Change(){
// if req shows "loaded"
if (req.readyState==4) {
// if OK
if (req.status==200) {
else {
document.getElementById('A1').innerHTML="(Connection Failure)"

<body onload="loadURL('http://www.yahoo.com')">
<b><a href="http://www.yahoo.com">Yahoo test</a> <span id="A1"></span></b>

It works fine offline, but once I put the code into an HTML portlet it doesn't work. I am not getting the security warning pop up so it doesn't look like the xmlhttp request object is being created.

Has anyone been able to get anything similar to work? Is there a better way to do this?
Re: Creating AJAX portlets in Oracle Portal [message #323559 is a reply to message #283652] Wed, 28 May 2008 17:58 Go to previous message
Messages: 11
Registered: November 2007
Junior Member
I've come across something similar, but not using AJAX. Portal sometimes restricts calls to external web sites from within html, so that could be your problem. If you could use a local site rather than Yahoo for your testing that may work.

Good luck,

Previous Topic: Display a bind variable
Next Topic: Portal Application Development Tutorial
Goto Forum:

Current Time: Sat Aug 19 15:43:35 CDT 2017

Total time taken to generate the page: 0.06003 seconds