|
chart with buttons problem |
Posted by m_jay on Jan-27-2011 15:49 |
|
I want to put 12 buttons for 12 months so I have created it in separate html page.
(MainSegmentation.html)
Then I have crated a php file which includes code of my chart.(Segment_Factor.php)
When I load the (MainSegmentation.html) page Default.php chart displaying with 12
buttons.When I click on on of these button relevant chart will displayed on
Segment_Factor.php page.
I want to display same 12 buttons on Segment_Factor.php.
Is it possible to display buttons with graph on same page.
Can I use html frames for this problem? |
Re: chart with buttons problem |
Posted by Peter Kwan on Jan-28-2011 00:55 |
|
Hi m_jay,
You can refer to my response to your previous message for the correct code structure:
http://www.chartdir.com/forum/download_thread.php?site=chartdir&bn=chartdir_support&thread=1295933908#N1296063697
I think you already know how to write a web page with 12 buttons (MainSegmentation.html).
The code in my message also suggests how to write a web page that contains a chart. I repeat the web page here:
<html><body>
<img src="createMyChart.php?xxx=<?php $_POST['Submit'] ?>">
</body></html>
The above should be your "Segment_Factor.php". If you want to put 12 buttons on it, please simply put them there. (You can put any other HTML in that page.)
You should put your charting code in "createMyChart.php". The month name can be obtained in that script as:
$month = $_GET["xxx"];
Hope this can help.
Regards
Peter Kwan |
Re: chart with buttons problem |
Posted by M_jay on Jan-28-2011 11:46 |
|
I changed my code according to your instructions.
But when I clicked on button of MainSegmentation.html page I got Seg_Main1.php page with small square and 12 buttons.
I think small sqaure may be imageloading errror icon.
MainSegmentation.html
<body>
<img src="Segment_Factor_Default.php"/>
<form action="Seg_main1.php" method="POST">
<input type="submit" name="Submit" value="January" />
<input type="submit" name="Submit" value="February" />
<input type="submit" name="Submit" value="March" />
<input type="submit" name="Submit" value="April" />
<input type="submit" name="Submit" value="May" />
<input type="submit" name="Submit" value="June" />
<input type="submit" name="Submit" value="July" />
<input type="submit" name="Submit" value="August" />
<input type="submit" name="Submit" value="September" />
<input type="submit" name="Submit" value="October" />
<input type="submit" name="Submit" value="November" />
<input type="submit" name="Submit" value="December" />
</form>
</body>
Seg_Main1.php
<body>
<img src="MyGraph.php?xxx=<?php $_POST['Submit']?>">
<form action="Seg_main1.php" method="POST">
<input type="submit" name="Submit" value="January" />
<input type="submit" name="Submit" value="February" />
<input type="submit" name="Submit" value="March" />
<input type="submit" name="Submit" value="April" />
<input type="submit" name="Submit" value="May" />
<input type="submit" name="Submit" value="June" />
<input type="submit" name="Submit" value="July" />
<input type="submit" name="Submit" value="August" />
<input type="submit" name="Submit" value="September" />
<input type="submit" name="Submit" value="October" />
<input type="submit" name="Submit" value="November" />
<input type="submit" name="Submit" value="December" />
</form>
</body>
MyChart.php
This page contains code of my Chart and I have retrieved $month variable as below.
$month= $_GET["xxx"];
Help me! |
Re: chart with buttons problem |
Posted by Peter Kwan on Jan-28-2011 16:33 |
|
Hi M_jay,
Sorry. The "MyGraph.php?xxx=<?php $_POST['Submit'] ?>" should be "MyGraph.php?xxx=<?php echo $_POST['Submit'] ?>".
In general, when you see a broken image symbol, please go into the symbol to read the error message. You should immediately see what is the error by looking at the URL of the image and reading the error message.
In case you are not aware how to go into the broken symbol, see:
http://www.chartdir.com/forum/download_thread.php?site=chartdir&bn=chartdir_faq&thread=1117817200
Hope this can help.
Regards
Peter Kwan |
|