Hi,
Would it be possible to confirm if there is a way of running PHP code without a new browser tab opening?
I have a button on a database form that has an onclick event that calls
nuRunPHP('newid');
The php code within newid runs a SQL update on a table.
The issue I'm seeing is that the code runs fine, but it creates an additional tab each time it runs. Is there anyway of either not opening the new tab or close the tab after the codes completes?
Thanks
Steve
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.
NuRunPHP -new tab opens
-
- Site Admin
- Posts: 2781
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 1 time
Re: NuRunPHP -new tab opens
stevem,
Here is an example of how you can run php in one of nuBuilderPro's iFrame Objects.
1. Create a PHP Code record with
the Code zzz
the PHP..
2. Create an iFrame Object on a Form with the name testphp.
3. Create a button with the following event.
NOW zzz will be run as the Form loads but because it doesn't know #bob#, we stop it from doing anything.
Each time you click your button, zzz will be run without opening another tab.
Steven
Here is an example of how you can run php in one of nuBuilderPro's iFrame Objects.
1. Create a PHP Code record with
the Code zzz
the PHP..
Code: Select all
print "
<html>
<body style='background-color:red'>
</body>
</html>
";
//-- remove the HTML and the iFrame will not be visible
if('#bob#' == 'world'){
print ' hello #bob# ';
}
Code: Select all
nuSetHash('bob', 'world');
nuRunPHP('zzz', 'testphp');
Each time you click your button, zzz will be run without opening another tab.
Steven
-
- Posts: 8
- Joined: Tue Jun 24, 2014 12:59 pm