> -----Original Message----- > From: Andreas Schlegel [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 12, 2002 4:07 AM > To: [EMAIL PROTECTED] > Subject: OT: open page in new frame > > > Hi, > > I am looking for a way to open a page in another frame automatically. > This should happen by calling a servlet not a static page. > > Im my servlet application I already tried the following solutions but > without success: > > out.append( "<META HTTP-EQUIV='Window-Target' > CONTENT='newFrame'>\n" ); > out.append( "<meta http-equiv='refresh' content='1; URL=" + myURL + > "'>\n" );
Never tried this one. > > or: > > out.append( "<script>\n" ); > out.append( " window.open('" + myURL + "', 'newFrame', '');\n" ); > out.append( "</script>\n" ); This code should work fine. For debugging purposes, just type some url inplace of myURL and see if it opens, then you can try by giving it a variable name. > > I suppose the JavaScript doesn't run because I don't know to > get a valid > URL calling the servlet in this code. You can check whether javascript runs or not, by giving an alert(), inside. But it should run, since you are outputting the data. > > Any ideas? > > Greetings, > Andreas Vikram. > > ______________________________________________________________ > _____________ > To unsubscribe, send email to [EMAIL PROTECTED] and > include in the body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: > http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html