You are here: Re: refresh problem « PHP Programming Language « IT news, forums, messages
Re: refresh problem

Posted by Erwin Moller on 06/22/06 14:22

chsadaki@hotmail.com wrote:

> Hello....
>
> I'm working on a page that finds the shortest path between two nodes.
> The problem is when I draw a node on the map(in the administrative
> page) to save it later in a mysql table, the node doesn't appear unless
> I press the refresh button of the borwser...
>
> this is the code that i worte

Hi,

It loos like you are mixing PHP and JS in a bad way.
Look at the HTML-source your PHP produces, especially the onClick-handler.
It is not valid.

>
> function drawNode($drawMode){
>
> $x=$_GET[img_x];
> $y=$_GET[img_y];
> $map=imagecreatefromjpeg("nodedMap.jpg");
> $Black=imagecolorallocate($map,0,0,0);
> $drawMode='';
> imagefilledarc($map,$x,$y,10,10,0,360,$Black,IMG_ARC_PIE);
> imagejpeg($map,"nodedMap.jpg");
> mysql_query("insert into nodeinfo values ('',$x,$y)");
> return ;
> }
>
> and i call this function by this insturction:
>
> <input name="img" type="image" src="nodedMap.JPG" width="569"
> height="290" border="0" onClick="<? drawNode($drawMode); ?> " >


Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация