alin19 Posted February 13, 2008 Share Posted February 13, 2008 php works, java doesn't work and i need javascript to change that var <script language="javascript"> <!-- var x="0.0,100|34.156378600823,75.9945130315"; --> </script> </head> <?php $x="0.0,100|34.156378600823,75.9945130315"; ?> <body> <img src="http://chart.apis.google.com/chart? &chs=1000x300 &chd=t: <?php echo $x; ?> &cht=lc &chco=ffffff,000000 &chxt=x,y &chg=20,10,2,10 &chxl=0:|3|5|1:|0|73"alt="Sample chart"/> </body> <script language="javascript"> <!-- var x="0.0,100|34.156378600823,75.9945130315"; --> </script> </head> <?php $x="0.0,100|34.156378600823,75.9945130315"; ?> <body> <img src="http://chart.apis.google.com/chart? &chs=1000x300 &chd=t: <script language='javascript'> document.write(x); </script> &cht=lc &chco=ffffff,000000 &chxt=x,y &chg=20,10,2,10 &chxl=0:|3|5|1:|0|73"alt="Sample chart"/> </body> Link to comment https://forums.phpfreaks.com/topic/90868-phpjavascript/ Share on other sites More sharing options...
haku Posted February 13, 2008 Share Posted February 13, 2008 Steps to successfully getting help for a problem 1) State the overall goal of your script 2) State the goal of what you are trying to do in the step where the problem is arising 3) State what you want to happen in that step 4) State what is actually happening in that step 5) (this is a big one) Ask a question Link to comment https://forums.phpfreaks.com/topic/90868-phpjavascript/#findComment-465686 Share on other sites More sharing options...
alin19 Posted February 13, 2008 Author Share Posted February 13, 2008 1)i want to use this google grafic chart to create a dinamic crafic 2)after i use a php script and get data from a file; i insert that data into a javascript var and that javascript var into my grafic 3) to use "<img src="http://chart.apis.google.com/chart? &chs=1000x300 &chd=t: <script language='javascript'> document.write(x); </script> /// javascript is in center &cht=lc &chco=ffffff,000000 &chxt=x,y &chg=20,10,2,10 &chxl=0:|3|5|1:|0|73"alt="Sample chart"/>" as "< img src="http://chart.apis.google.com/chart? &chs=1000x300 &chd=t:0.0,100|34.156378600823,75.9945130315 &cht=lc &chco=ffffff,000000 &chxt=x,y &chg=20,10,2,10 &chxl=0:|3|5|1:|0|73"alt="Sample chart"/ > " 4) the date dosn't reach the grafic <script language='javascript'> document.write(x); //this is not writen in google grafic char </script> 5) what i forgot? Link to comment https://forums.phpfreaks.com/topic/90868-phpjavascript/#findComment-465689 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.