Firefox Background-Image Problem

Happyemo

Mitglied
Hallo Leute, ich habe hier ein kleines Problemchen:

Ich mächte in einen Div ein Background-image laden.
Kurz und knapp: IE machts, FF jammert.

Und zwar gibt es angeblich bei der Deklaration von "background-image" ein Problem (laut Fehlerkonsole).

Ich poste hier mal eben den Code, wie er in der JSP steht:

HTML:
<div id="image" style="position:absolute; height:500px; width:<%=700+extraWidth%>px; top:30px; left:20px;
background-attachment:fixed; background-repeat:no-repeat;
background-image:url(BatchStatistic.gif?batchname=<%=batchdata.getBatchname()%>
		&date=<%=batchdata.getDate()%>
		&duration=<%=batchdata.getDuration()%>
&performance=<%=batchdata.getPerformance()%>
&analyzeYear=<%=batchdata.getAnalyzeYear()%>
&showDurationRows=<%=batchdata.getShowDurationRows()%>
&showStartTime=<%=batchdata.getShowStartTime()%>
&showEndTime=<%=batchdata.getShowEndTime()%>
&showDuration=<%=batchdata.getShowDuration()%>
&showPerformance=<%=batchdata.getShowPerformance()%>
&showAvgPerformance=<%=batchdata.getShowAvgPerfromance()%>
		&zoomStartX=<%=zoomStartX%>
		&zoomStartY=<%=zoomStartY%>
		&zoomEndX=<%=zoomEndX%>
		&zoomEndY=<%=zoomEndY%>
		&actual=<%=request.getParameter("actual")%>
		&reset=<%=request.getParameter("reset")%>
<%
	if(!(request.getParameter("actual").toString()).equals("yes")){
	int sumSelectedPlants=Integer.parseInt(request.getParameter("selectedPlants"));
       	int j;
       	 for(j = 0; j < sumSelectedPlants; j++){
          	out.print("&plant"+j+"="+request.getParameter("plant"+j));}
         out.print("&plantlistsize"+"="+j);}
    else{
    int z;
         for(z=0;z<Integer.parseInt(request.getParameter("plantlistsize").toString());z++){
          	out.print("&plant"+z+"="+request.getParameter("plant"+z));}
          out.print("&plantlistsize"+"="+z); 
        }%>);"  onmousedown="down(event)" onmousemove="moving(event)" onmouseup="up()"onmouseout="up()"> </div>

Und hier wie er als Resultat da steht:

HTML:
<div id="image" style="position:absolute; height:500px; width:700px; top:30px; left:20px;
                         background-attachment:fixed; background-repeat:no-repeat;
		background-image:url(BatchStatistic.gif?batchname=AFTERSALES
		&date=3/2010
		&duration=null
		&performance=on								&analyzeYear=null
	&showDurationRows=null
	&showStartTime=null
	&showEndTime=null
	&showDuration=null
	&showPerformance=null
	&showAvgPerformance=null
	&zoomStartX=0
	&zoomStartY=0
	&zoomEndX=0
	&zoomEndY=0
	&actual=no
	&reset=no
&plant0=006&plantlistsize=1);"  onmousedown="down(event)" onmousemove="moving(event)" onmouseup="up()"onmouseout="up()"> </div>

So, warum funktioniert das im IE, aber nicht im FF?
Hab schon sehr lange gegoogelt, aber hab einfach nichts gefunden? :rtfm:

MfG
 

Lemieux

Mitglied
Klammer schließen beim URL Tag? ;-)

url(BatchStatistic.gif?batchname=<%=batchdata.getBatchname()%>


EDIT:
Ok, sorry, wohl doch nicht, is ja mal ne tolle URL für ein Bild :D
 
Zuletzt bearbeitet:

Happyemo

Mitglied
Ja es wird eigentlich ein Servlet aufgerufen das in den Outputstream ein Gif zeichnet, ist nur mit dem Namen "BatchStatistik.gif" registriert
 

Happyemo

Mitglied
Problem gelöst:

Firefox kam mit den ganzen Zeilenumbrüchen (die auch Lemieux etwas verwirrt haben) nicht zurecht, der IE schon.

Enfach die ganze URL vorher in einen String schreiben, dann klappts:

HTML:
background-image:url('<%=img_url%>');
 

Ähnliche Java Themen

Neue Themen


Oben