Forum Moderators: open

Message Too Old, No Replies

Problem with a routine in java with explorer

Problem with a routine in java with explorer

         

coer

3:23 pm on Jun 20, 2007 (gmt 0)

10+ Year Member



need to run via local (i mean with this a simply click on the .html file not running on server not running on 127.0.0.1 only a click and thats all) a page my problem is when i click on my java button to open a new java window explorer don´t open. But the same routine runs perfect in: 1.-Mozilla via local all ways, 2.-Same explorer but running from a server or 127.0.0.1 but this can´t work for me because the program will be run from a CD.
Is very important because i need to use explorer for the users that will use that thing and i need to run from CD and no from servers or 127.0.0.1. The routine is something similar like this one:
Note: Only in the Abrir_ventana function calls is where i´m making the call and the routine (javascript:Abrir_ventana()), and how can i modify this to run ok in explorer like i said, what i need ot modify to call my javascript any suggestion. Thank you.

function Abrir_ventana (pagina) {
var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=640, height=365, top=85, left=140";
var pagina="formota.html"
window.open(pagina,"",opciones);
}

</script>
</HEAD>

<BODY class=mainbody onload="writeInfoCheck()">

<SCRIPT LANGUAGE="JavaScript">
msg = "<TABLE border=0 cellspacing=0 cellpadding=0 width=100%><TD height=1px bgcolor=#336699></TD></TABLE>"
msg = msg + "<TABLE WIDTH=100% bgcolor=#FDFDF3 cellspacing=0 cellpadding=0><TD align=left><TABLE border=0 cellspacing=0 cellpadding=5>"

if (typeof g_sSupportEmail=='undefined'){g_sSupportEmail=""}
if (g_sSupportEmail!=''){
msg = msg + "<TD align=center><P class=admin><A HREF='javascript:Abrir_ventana()'><IMG SRC='../images/kplms_support.gif' border=0 vspace=2><BR>Contact Support</A></TD>"
}

DrDoc

4:25 pm on Jun 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld! [WebmasterWorld.com]

For security reasons, as of XP SP2, Microsoft does by default prevent scripts from running locally. If the script is run in the "local" zone, you get the error message.

However, you can force the page to be run in the "internet" zone, even if run locally. To do so, add the following code to your HTML:

<!-- saved from url=(0014)about:internet -->

That is called a "mark of the web". Place that line immediately after your DOCTYPE, and you're set!

Microsoft's technical description of the problem [microsoft.com] (under Local Machine Zone Lockdown)
Easier-to-understand description of problem, by Adobe [kb.adobe.com]

[edited by: DrDoc at 4:30 pm (utc) on June 20, 2007]

coer

5:25 pm on Jun 20, 2007 (gmt 0)

10+ Year Member



i made the change look and makes the same that application the thing is consits of many asp routines that are called and in the line i gave you is one of the asps:
<HTML>
<HEAD>
<!-- saved from url=(0014)about:internet -->
<META http-equiv="Pragma" CONTENT="no-cache">
<TITLE>Digital 2000 and Shadai Productions</TITLE>
<link rel='stylesheet' href='../styles/kplmsstyle.css'>

DrDoc

5:36 pm on Jun 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Place that line immediately after your DOCTYPE, and you're set!

Your DOCTYPE [w3.org] is the first element of your HTML. If you are not currently using a DOCTYPE (you really should consider doing so), simply place the "mark of the web" before your <html> element.

coer

7:35 pm on Jun 20, 2007 (gmt 0)

10+ Year Member



look the function i´m makin and after the call. Loof the function first:
Note on the beginning of the doc like you said i put your solution and now works me the button of my link to mail but i have other routine other function dont work maybe is the function routine look:

function showResults(last_search_data,actname){
last_search_data = unescape(lessondetails[last_search_data])
floater=window.open('', '', 'toolbar=yes,location=no,resizable=yes,directories=no,menubar=yes,scrollbars=yes')
floater.document.open()
floater.document.write ('<!-- saved from url=(0014)about:internet -->')
floater.document.write ('<HTML><HEAD><TITLE>Report</TITLE></HEAD>')
floater.document.write ("<link rel='stylesheet' href='../styles/kplmsstyle.css'>")
floater.document.write ('<body bgcolor="#FFFFFF">')
floater.document.write ('<P class=r_detailed><B>Detailed Report Summary</B></P>')
floater.document.write ('<P class=r_activity><B>Lesson:</B> ' + actname + '</P>')
floater.document.write ('<P class=r_username><B>Results Summary for</B> ' + scorm_student_name + '</P>')
splitdetails2 = last_search_data.split("¦")
floater.document.write ('<P class=r_date><B>Date Taken:</B> ' + splitdetails2[3] + '</P>')
floater.document.write ('<P class=r_status><B>Status:</B> ' + splitdetails2[2] + '</P>')
floater.document.write ('<P class=r_score><B>Score:</B> ')
if (splitdetails2[6]=="0"){
floater.document.write ('Not applicable</P>')
floater.document.write ('<!-- saved from url=(0014)about:internet -->')
}else{
floater.document.write (parseInt(splitdetails2[4]) + '%</P>')
floater.document.write ('<!-- saved from url=(0014)about:internet -->')
}
floater.document.write ('<P class=r_time><B>Time Taken:</B> ' + splitdetails2[1] + ' (HHHH:MM:SS)</P>')
if (typeof splitdetails[7]!='undefined'){
splitdetails2[7]=fur(splitdetails2[7],'¥¥¥','®®®')
splitdetails2[7]=fur(splitdetails2[7],'¥¥','®®®')
splitdetails2[7]=fur(splitdetails2[7],'®®®','¥¥¥')
floater.document.write ('<P class=r_detailed><B>Detailed Results</B></P>')
splitdetails3 = splitdetails2[7].split("¥¥¥")
for (j = 0; j <= splitdetails3.length-2; j++) {
splitdetails4 = splitdetails3[j].split("¥")
if (splitdetails4[1]=='choice'){
floater.document.write ('<P class=r_question><B>Question:</B> ' + fur(splitdetails4[2],'_',' ') + '</P>')
floater.document.write ('<P class=r_answer><B>Answer Selected:</B> ' + splitdetails4[7] + '</P>')
floater.document.write ('<P class=r_result><B>Result:</B> ' + splitdetails4[3] + '</P>')
if (splitdetails4[3]=='wrong'){
floater.document.write ('<P class=r_correct><B>Correct Result:</B> ' + splitdetails4[8] + '</P>')
}
floater.document.write ('<P class=r_ttaken><B>Time Taken to Answer:</B> ' + splitdetails4[5] + ' (HHHH:MM:SS)</P>')
}else{
if (splitdetails4[1]=='newperformance'){
floater.document.write ('<P class=r_question><B>Objective:</B> ' + fur(splitdetails4[2],'_',' ') + '</P>')
if (splitdetails4[7]!=' '){floater.document.write ('<P class=r_answer><B>Answer Selected:</B> ' + splitdetails4[7] + '</P>')}
floater.document.write ('<P class=r_result><B>Result:</B> ' + parseInt(splitdetails4[3]) + '%</P>')
if (parseInt(splitdetails4[3])==0&&splitdetails4[8]!=' '){
floater.document.write ('<P class=r_correct><B>Correct Result:</B> ' + splitdetails4[8] + '</P>')
}
floater.document.write ('<P class=r_ttaken><B>Time Taken to Complete Objective:</B> ' + splitdetails4[5] + ' (HHHH:MM:SS)</P>')
}else{
floater.document.write ('<P class=r_question><B>Objective:</B> ' + splitdetails4[2] + '</P>')
floater.document.write ('<P class=r_result><B>Result:</B> ' + parseInt(splitdetails4[3]) + '%</P>')
floater.document.write ('<P class=r_ttaken><B>Time Taken to Complete Objective:</B> ' + splitdetails4[5] + ' (HHHH:MM:SS)</P>')
}
}
}
}
floater.document.write ('</body>')
floater.document.write ('</html>')
floater.document.close()
floater.focus()
}

and look the call where not launch:

msg = msg + "<TD><P class=attempted><B><A HREF='javascript:showResults(\"" + sendstring + "\",\"" + actname + "\")'>Show Details</B></A></P></TD></TR>"