HTML Tutorial


 /help/HTML Help Forum   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
HTML .JSP PAGE POP UP PROBLEM
Post new topic   Reply to topic    HTML Help Forum -> Javascript
View previous topic :: View next topic  
Author Message
Baulder



Joined: 15 Apr 2005
Posts: 3

PostPosted: Fri Apr 15, 2005 4:29 pm     HTML .JSP PAGE POP UP PROBLEM Reply with quote

O.K
This is probably a no brainer but I'm new (2 weeks ) to this stuff.

I copied the POP UP html example and it works fine.
Problem is that when I try to incorporate it in my .JSP page (SOMEFILE.JSP)I get
a footnote saying Error on page when I click the .gif.

The code looks ok when I view the html generated!

Code is :

<%

out.println("<HTML>");
out.println("<head>");
out.println("<SCRIPT TYPE=\"text/javascript\">");

out.println("function popup(mylink, windowname)");
out.println("{");
out.println("if (! window.focus)return true;");
out.println("var href;");
out.println("if (typeof(mylink) == 'string')");
out.println(" href=mylink;");
out.println("else");
out.println(" href=mylink.href;");
out.println("window.open(href, windowname, 'width=400,height=200,scrollbars=yes');");
out.println("return false;");
out.println("}");

out.println("</SCRIPT>");
out.println("</head>");



out.println("<MAP NAME=\"index\">");
out.println("<AREA");
out.println(" HREF=\"c:\\oracle.gif\" ALT=\"My Popup\"");
out.println(" COORDS=\"10,10,120,120\" SHAPE=RECT ");
out.println(" onClick=\"return popup(this, 'gloss',0)\">");



out.println("<AREA ");
out.println(" SHAPE=RECT ALT=\"Your Popup\"");
out.println(" COORDS=\"140,10,180,50\" HREF=\"c:\\oracle.gif\"");
out.println(" onClick=\"return popup(this, 'gloss',0)\">");

out.println("<AREA SHAPE=DEFAULT NOHREF>");
out.println("</MAP>");

out.println("<IMG SRC=\"c:\\oracle.gif\" HEIGHT=130 WIDTH=190 ALT=\"Image Map Example\" BORDER=\"0\" USEMAP=\"#index\"");



out.println("</HTML>");
%>


/* Any help would be greatly appreciated.

Baulder */
degsy



Joined: 23 Feb 2005
Posts: 2440
Location: North East, UK

PostPosted: Fri Apr 15, 2005 6:53 pm     Reply with quote

Quote:

a footnote saying Error on page when I click the .gif.

What is the error?

Check in different browsers as Gecko usually give more detailed errors.
Baulder



Joined: 15 Apr 2005
Posts: 3

PostPosted: Sat Apr 16, 2005 2:22 am     Reply with quote

I Clicked on the warning icon and I got:

Line: 12
Char: 1
Error: Access is denied.
Code:0
URL:http://localhost:8080/jsp-examples/jsp2/el/S1.jsp

Thanks,

Baulder
Baulder



Joined: 15 Apr 2005
Posts: 3

PostPosted: Sat Apr 16, 2005 2:48 am     Reply with quote

Hi,

Thanks degsy.

Searched on error message and got answer to problem
from the following post.

SUBJECT: Access denied in loading xml.

Khalid Ali posted:

yes,apache is stopping you ,because you are trying to access a resource from the local disk,try to map a virtual path to this drive in tomcat, or put the file in the tomcat root folder and point it to there.

Put my .gif in the tomcat ROOT dir and weh hay!!!!!!!

Thanks for your time,

Baulder.
[img][/img]
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum -> Javascript All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial