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!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
NuRunPHP -new tab opens
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
You do not have the required permissions to view the files attached to this post.
-
- Posts: 8
- Joined: Tue Jun 24, 2014 12:59 pm