Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Hash Variable Parameter for PHP Procedure

Post Reply
vario
Posts: 148
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 1 time
Been thanked: 1 time

Hash Variable Parameter for PHP Procedure

Unread post by vario »

I am struggling to get this to work!
I have a browse form based on my "employee" table.
The edit form has a subform and one display field showing the value CONCAT(emp_surname,', ',emp_forename) on one tab, and on another tab there is an iframe containing a Google graph.
I want to set two hash variables in the edit form containing arbitrary dates as parameters for the Google graph, but cannot get them to be picked up by the PHP code generating the graph. I have tried creating display fields, using nuSetHash, selecting the dates with the browse SQL but no luck.
Can you help?
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Hash Variable Parameter for PHP Procedure

Unread post by admin »

vario,

Are you changing the dates after the graph is displayed?

Steven
vario
Posts: 148
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 1 time
Been thanked: 1 time

Re: Hash Variable Parameter for PHP Procedure

Unread post by vario »

Yes, that was my plan - the user would be able to redraw the graph according to their choice of dates. It is displayed initially with a preset date range. I have looked at the example attached to the wiki entry for iframes which suggests this sort of thing is possible but (being a novice) can't quite adapt it to my needs.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Hash Variable Parameter for PHP Procedure

Unread post by admin »

vario,

Is it an iFrame created here ?
Capture.PNG
If it is try using

nuRunPHP()

http://wiki.nubuilder.net/index.php/Jav ... C_id.5D.29



Steven
You do not have the required permissions to view the files attached to this post.
vario
Posts: 148
Joined: Mon Dec 05, 2011 12:23 pm
Location: Newton Abbot, UK
Has thanked: 1 time
Been thanked: 1 time

Re: Hash Variable Parameter for PHP Procedure

Unread post by vario »

Steven,

It is an iframe form object which runs a PHP procedure creating the Google chart. I want to use #from_date# and #to_date# within the procedure. It works if I run the code via "Run Procedure" with a form having the two dates as fields, but not if the two dates are on the edit form with the iframe. Perhaps the iframe cannot see the edit form fields?

Neil.
admin
Site Admin
Posts: 2814
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Hash Variable Parameter for PHP Procedure

Unread post by admin »

Neil,

use nuDebug() to see what values #from_date# and #to_date# give you.

Steven
Post Reply