[Chameleon] LocateByAttribute IFRAME question

Gambin Dejan Dejan.Gambin at pula.hr
Tue Mar 21 03:10:21 EST 2006


Hi Jacob,

I have defined the following in searchresults.phtml (without the first
three lines I get "unterminated string literal" error):

	$bodycontent= str_replace ('"','\"', $bodycontent);
	$bodycontent= str_replace ("\n"," ", $bodycontent);
	$bodycontent= str_replace ("\r","", $bodycontent);
	print "<SCRIPT>\n";
	print "var content = \"".$bodycontent."\"\n\n";
	print
"mappingwindow.SearchResultsIframe.document.write(content);\n";
	print "</SCRIPT>\n";	

and I have "<IFRAME id="SearchResultsIframe" border=0 frameborder=0
width=610 height=50></IFRAME>" defined in my initial html file. When
doing the search I get an ampty frame and the following error in JS
Console:

"Error: mappingwindow.SearchResultsIframe has no properties"

Obviously I am doing something wrong...any help

thanks, dejan


> -----Original Message-----
> From: chameleon-bounces at lists.maptools.org 
> [mailto:chameleon-bounces at lists.maptools.org] On Behalf Of 
> Delfos, Jacob
> Sent: Tuesday, March 21, 2006 1:03 AM
> To: chameleon at lists.maptools.org
> Subject: RE: [Chameleon] LocateByAttribute IFRAME question
> 
> 
> Oops, don't forget to put a closing script tag:
>  
> print
> "<script>mappingwindow.secondiframe.document.write(\"".$bodyco
> ntent."\")
> ;</script>"; 
> 
> And "secondiframe" is the ID of your second iframe.
> 
> Jacob
> 
> 
> 
> ________________________________
> 
> 	From: chameleon-bounces at lists.maptools.org
> [mailto:chameleon-bounces at lists.maptools.org] On Behalf Of 
> Delfos, Jacob
> 	Sent: 21 March 2006 07:22
> 	To: chameleon at lists.maptools.org
> 	Subject: [Chameleon] RE: LocateByAttribute IFRAME question
> 	
> 	
> 
> 	In searchresults.phtml, line 744, it says: 
> 
> 	      print $bodycontent; 
> 
> 	You could change that, to say something like 
> 
> 	print
> "<script>mappingwindow.secondiframe.document.write(\"".$bodyco
> ntent."\")
> ;"; 
> 
> 	I haven't tested it, so it may not work. But something 
> like that should be feasible. 
> 
> 	Regards, 
> 
> 	Jacob 
> 
> 
> 
> 	> -----Original Message----- 
> 	> From: Dejan Gambin [mailto:dejan.gambin at pula.hr 
> <mailto:dejan.gambin at pula.hr> ] 
> 	> Sent: 21 March 2006 06:44 
> 	> To: Delfos, Jacob 
> 	> Cc: chameleon at lists.maptools.org 
> 	> Subject: LocateByAttribute IFRAME question 
> 	> 
> 	> Hi, 
> 	> 
> 	> Sorry to bother you again but I came to another idea 
> 	> regarding the location 
> 	> of my search results in LocateByAttribute widget. First i 
> 	> wanted to use 
> 	> popup to show results because of not enough space I 
> had, but now I am 
> 	> wondering if I can place the search results in another 
> 	> iframe. So basically, 
> 	> I would like to have the search form in a "tab" like I have 
> 	> now but show the 
> 	> search results (bodycontent) in another "iframe" on the 
> 	> bottom of my page. I 
> 	> have tried to use "target" attribute of a search form but I 
> 	> don't get what I 
> 	> want. Any suggestion? 
> 	> 
> 	> thanks 
> 	> 
> 	> regards, dejan 
> 	> 
> 	> 
> 
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org 
> http://lists.maptools.org/mailman/listinfo/chameleon
> 



More information about the Chameleon mailing list