cancel
Showing results for 
Search instead for 
Did you mean: 

JSP DynPages and Image Map

Former Member
0 Kudos

Hello,

I've created JSPs with JSP DynPages. Now i vant to switch from one JSP to the other. How can I do this? This is my Code from the first JSP:


<%-- DHLICenter.jsp --%>
<%@ taglib uri= "tagLib" prefix="hbj" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
	<title>Ihre Auswahl</title>
	<head>
	
	</head>

	<body>
	<% String PublicURL = componentRequest.getWebResourcePath() ; %>
	<MAP NAME=map1>
		<AREA  HREF="page2.jsp" COORDS="350,270,460,330">
	</MAP>
	
		<img src='<%= PublicURL+ "/images/screen1.png" %>' usemap="#map1" border="0" />

	</body>
</html>

The Path for the Image works fine. But when i click the area i got an error message (iview not found). Can someone help me? Thanks in advance...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Alexander,

If u are using the jspdynpages ,,then navigate from one jsp to other thru the controller..

Its always best practice to change the jsp state in controller

for instnace ,,u can change ur code this way nd try:

Use an image Button using HTMLB

for instance

<htmlb:button id = "myButton14"

text =

"<img src='/sap/public/bsp/sap/public/bc/icons/s_s_okay.gif' border='0'>OK "

onClick = "myButtonClick"

encode = "FALSE" />

Now in ur controller

looks like this

public static final int PAGE1 = 0;

public static final int PAGE2 = 1;

int PAGE_STATUS = PAGE1 ;

public void doProcessBeforeOutput() throws PageException {

switch (PAGE_STATUS) {

case PAGE1 :

this.setJspName("page1.jsp");

break;

case PAGE2 :

this.setJspName("page2.jsp");

break;

}

}

public void onMyButtonClick(Event event) throws PageException {

try {

PAGE_STATUS = PAGE2;

} catch (Exception e) {

PAGE_STATUS = ERROR_PAGE;

}

Cheers

Swathi

Do offer pts nd ncourage:-)

Former Member
0 Kudos

Thanks Swathi for your answer.

I know how it works in HTMLB. But i want to know

how it works for my speciall Problem in HTML.

Or how can make a Image map in HTMLB?

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks Swathi for your answer.

I know how it works in HTMLB. But i want to know how it works for my speciall Problem in HTML. Or how can make a Image map in HTMLB?