Hi,
Is there any way to run php code on modal window?
I already have my php code working for iframe object and now trying to bind it with custom button click for html object,
I need run something like this inside html object
<script type="text/javascript">
function openiFrame(phpCode){
var w = new nuWindow();
w.call_type = 'nurunphp';
w.php = phpCode; // already have this code in php procedures
nuSession.nuWindows.push(w);
nuIframeWindow(w);
}
</script>
<input type="button" value="TestingButtonClick " onclick="openiFrame('drawPieGraph')" class="nuButton" />
Thanks.
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
how to run php in modal window
-
- Site Admin
- Posts: 2789
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 4 times
Re: how to run php in modal window
elmira_k82,
I don't understand. You need to explain your question a lot more, maybe incude pictures.
My guess is you are not using nuBuilderPro to do what you need, the way it should be (which is likely much simpler).
Steven.
I don't understand. You need to explain your question a lot more, maybe incude pictures.
My guess is you are not using nuBuilderPro to do what you need, the way it should be (which is likely much simpler).
Steven.
-
- Posts: 7
- Joined: Sun Mar 01, 2015 8:35 pm
Re: how to run php in modal window
Hi Steven,
I have buttons generated as html object like (btns.png)
And also have php codes drawing google charts (chartCode.png)
After click to buttons I'm trying to generate different charts inside pupup which I already have in php codes.
I have buttons generated as html object like (btns.png)
And also have php codes drawing google charts (chartCode.png)
After click to buttons I'm trying to generate different charts inside pupup which I already have in php codes.
- Attachments
-
- btns.png (100.88 KiB) Viewed 3585 times
-
- chartCode.png (47.81 KiB) Viewed 3585 times
-
- Posts: 7
- Joined: Sun Mar 01, 2015 8:35 pm
Re: how to run php in modal window
also for botton clicks nuRunPHP() works fine only code generated outside as a new tab
<input type="button" class="nuButton" value="Patients By Gender" onclick="nuRunPHP('graphPatGender')" />
<input type="button" class="nuButton" value="Patients By Gender" onclick="nuRunPHP('graphPatGender')" />
- Attachments
-
- nuRunPHP.png (42.42 KiB) Viewed 3585 times
-
- Site Admin
- Posts: 2789
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 4 times
Re: how to run php in modal window
elmira_k82,
Let me see if I understand...
Do you want a different graph to appear inside the iFrame that already exists, when you click on a button?
If so, add the id (Field Name) as a second parameter to nuRunPHP() eg. nuRunPHP('graphPatGender', 'graph_iframe')
http://wiki.nubuilder.net/index.php/Jav ... C_id.5D.29
Secondly if you create nuBuilderPro Button Objects instead of hardcoding html to make buttons. You can drag them where ever you want them and add onclick Events that will call nuRunPHP().
http://wiki.nubuilder.net/index.php/Add ... Button_Tab
Steven
Let me see if I understand...
Do you want a different graph to appear inside the iFrame that already exists, when you click on a button?
If so, add the id (Field Name) as a second parameter to nuRunPHP() eg. nuRunPHP('graphPatGender', 'graph_iframe')
http://wiki.nubuilder.net/index.php/Jav ... C_id.5D.29
Secondly if you create nuBuilderPro Button Objects instead of hardcoding html to make buttons. You can drag them where ever you want them and add onclick Events that will call nuRunPHP().
http://wiki.nubuilder.net/index.php/Add ... Button_Tab
Steven