Hi everyone,
I have a code that works great in Firefox, but absolutely not in IE... and I really have no idea why...
Therefore, I am asking for your help.
Any suggestions, comments and help will be greatly appreciated !
Basically, I have an html page where I have an applet.
As this applet needs a parameter, I pass it via the URL and retrieve it thanks to a javascript functions found on the web.
Then, I generate the html code for the PARAMETER tag.
As I said, this works great under Firefox but not under IE.
Code:
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Applet page</TITLE>
</HEAD>
<BODY>
<script type="text/javascript">
function gup( name )
{
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var tmpURL = window.location.href;
var results = regex.exec( tmpURL );
if( results == null )
return "";
else
return results[1];
}
</script>
<H1> Sample applet</H1>
To run this use the applet viewer of JDK 1.1.x
<p>
<APPLET CODE="testApplet.class" CODEBASE="."
ARCHIVE="myApplet.jar" HEIGHT="800" WIDTH="700">
<script type="text/javascript">
var my_param = gup( 'parameter' );
document.write("<PARAM NAME=\"openname\" VALUE=\"" + my_param + "\">");
</script>
Sorry, you need a Java browser to view this applet
</APPLET>
</BODY>
</HTML>
Thanks in advance !
|