struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dekar <>
Subject file save popup in javascript window
Date Mon, 27 Aug 2007 19:40:04 GMT

Hi, I dont know the source of this error but its really wierd error I think
the source is javascript/apacheconfig/struts. I am getting a save file popup
( as the filename) when I click a button in a javascript

I am trying to submit a form from a javascript window which invokes a
particular function from the corresponding action servlet (operation as the
parameter) (the content for window is populated using a jsp - topicpage.jsp)

something like when I click submit/save button the form on the window page
gets submitted. 

js files included in the jsp page
here is the structure of the jsp page:

String txtHTML = request.getAttribute("html")==null?"HTML not

//external js in topicpage.jsp
<script language="JavaScript"
//script which invokes the window........

<script language="JavaScript"
script which contains the function markassubmit() - sets a string 
 <script language="JavaScript"
<script language="Javascript">
function submitForm(page)
        document.TopicForm.operation.value = page;
        return true;

function updateParent() {
		opener.TopicHomeForm.operation.value = "refresh";

<body BGcolor="" onLoad="updateParent(); document_init();" 
onUnLoad="updateParent();self.close(); "> 

<html:form action="/" method="post">


button: <INPUT ALT="Submit the Topic" onClick="return markAsSubmit();
submitForm('submit');" type="image"

function mark as submit inside displaytopic.js is as follows
var lastCmd = "";
function markAsSubmit() {
	var _lastCmd = lastCmd;

	lastCmd = "submit";
	var rtn = submitTopic(this.TopicForm);

	if (rtn == false) {
		lastCmd = _lastCmd;
	else {
		setupAction("Submitting Topic");
	return rtn; 

I am using Weblogic server on port 7001, apache services
here are details for the apache httpd.conf
<LocationMatch "/Encounter/(?!docs)">
            SetHandler weblogic-handler
            WebLogicHost                 //my mac
            WebLogicPort 7001                                             
//port on which the encounter app is running
            Idempotent ON
            DebugConfigInfo ON

DocumentRoot "C:/TiaaWebs/St01/Docs"  //all the js files are located here 

now when I click the submit button on the topicpage window I get a popup to
save file with following details:
Do you want to save the following file?
Unknown File types

This error only occurs when I dont use the port in the apln URL (in shich
case the js file are taken from the war file in the build)

If I use the completed build with the js as part of the war package it run
perfect. I need to know what is causing the error..

View this message in context:
Sent from the Struts - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message