Quantcast
Channel: ASPRunner forums
Viewing all 2520 articles
Browse latest View live

Javascript Onload on view page, hiding rows on condition

$
0
0
Greetings, fellow scripter.

While using view page, i need to hide/show certain row (label-value) based on whenever it has valid value.
This table shows order-price, and using this script:

alert ("START BAH!!!");

var cPrice2 = Runner.getControl(pageid, 'price2');
var cPrice3 = Runner.getControl(pageid, 'price3');
var cPrice4 = Runner.getControl(pageid, 'price4');
var cPrice5 = Runner.getControl(pageid, 'price5');
var cPrice6 = Runner.getControl(pageid, 'price6');
var cPrice7 = Runner.getControl(pageid, 'price7');
var cPrice8 = Runner.getControl(pageid, 'price8');
var cDisc = Runner.getControl(pageid, 'disc_total');

alert ("MID 1 BAH!!!");

var h2 = cPrice2.getValue();
var h3 = cPrice3.getValue();
var h4 = cPrice4.getValue();
var h5 = cPrice5.getValue();
var h6 = cPrice6.getValue();
var h7 = cPrice7.getValue();
var h8 = cPrice8.getValue();
var dt = cDisc.getValue();

alert ("MID 2 BAH!!!");

if (h2 == 0) $("tr[data-fieldname='order2']").hide();
if (h3 == 0) $("tr[data-fieldname='order3']").hide();
if (h4 == 0) $("tr[data-fieldname='order4']").hide();
if (h5 == 0) $("tr[data-fieldname='order5']").hide();
if (h6 == 0) $("tr[data-fieldname='order6']").hide();
if (h7 == 0) $("tr[data-fieldname='order7']").hide();
if (h8 == 0) $("tr[data-fieldname='order8']").hide();
if (dt == 0) $("tr[data-fieldname='disc_total']").hide();

alert ("END BAH!!!");


The alert window only shows till MID 1. In other words, only the first block of the script was successfully executed.
I dont know whats wrong, i think i follows the guide and examples from PHPrunner help.

So, any thoughts will be greatly appreciated.
Thanks.

PHPR 9.6 - Project Logo not correct link?

$
0
0
Hello,

When I use (a text in the) Project Logo (please see topic description above),
- then, in the executing source is the link "/_menu.php" instead of "/menu.php".
So the "_" ist to much.
I make a mistake or ist this a little bug ?

Does somebody has any idea....

Thank you

Michael

[SOLVED] Update PHP password functions

Issue with varchar being interpreted as value

$
0
0
Hi,

I have an issue with the combination PHPRunner and MySQL. I have a table with a field that contains partnumbers, including partnumbers like 44E5083. The field type in MySQL is varchar.

Now when I hit a page with that partnumber I get the error message Illegal double '44E5083' value found during parsing. Googling the error message brought me to the believe that PHPRunner is interpreting the varchar as a value in scientific notification.

I changed my query to concert the varchar tot a CHAR, but the error keeps popping up. Has anyone seen this behaviour before and/or knows a solution or workaround?

Thanks!

Simple Javascript not working on production

$
0
0
I have a javascript alert that works on PHPRunner's built in web server, but not when I move it to my production server:

In Javascript onload event:

var ctrl = Runner.getControl(pageid, 'msg_date');
ctrl.makeReadonly();

this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){
  alert("Thanks for contacting us");
  return true;	
});


Live version not working at this site:
Contact Us Form

Thanks for any help

List page "Filter As" for multi select

$
0
0
Any Idea how to implement a "Filter as" setting for a multi-select dropdown or multi-select checkbox?

So the save form has options eg:
option1
option2
option3
option4

They select multiple for this option, eg option1+option3 and save to database.

Then on the list page there is a "Filter As" with 1,2,3,4 which will display any options they have ticked. So they could tick option1 and it will filter or option3 and this will filter.

Thanks for any ideas.

The Invisible reCAPTCHA

Foreign key vs. Master details vs. Lookup wizard

$
0
0
Hi there,
I am totally beginner in php and mysql.... :wub:

I build my db with some tables link between them self by foreign keys, with phprunner i find that i dont need to do that as i use the lookup wizard (i dont even have to use the master details relationship)... its very easy... "too" easy... :unsure: :unsure:

eg :

table 1
-id
-employee
-gender

table 2
-id
-gender

I set the lookup wizard for table 1 -gender to look on -id table 2 and now i have the gender of the employee.... No need Foreign key, no need Master details ...
Is this correct ?

HTML5 input type & " issue when partial information entered

$
0
0
I accidently submitted the post before finishing the subject line:

HTML5 input type & "mask" issue when partial information entered


I have a text field with the HTML5 input type "Tel number" and the Mask: "(999) 999-9999".

If I enter a number let's say "800" and then I lose focus of the text field by clicking another window, the number also disappears. Is there any way to keep the text stationary while I switch to another window? I notice this with other mask settings I select.

The second issue I'm having is copy and paste. If I copy a number that is let's say "8001234567" and then paste it in the box, how do I get it to display as "(800) 123-4567"? Instead, I first have to highlight the whole text field and then paste. When I paste, it will only fill out "(800) 123-456_"

I'm running v9.6 67464, and able to replicate this on firefox, chrome, android phone, and android tablet

Best solution to store a logged in User Record ID #

$
0
0
There is a session variable for username and event the user full name. However, what is the best solution if I would like to store the Users Record Number instead.

I tried to add a session variable on the After successful login event.

function AfterSuccessfulLogin($username, $password, $data) 

{ 
  $_SESSION["UID"] = $data["UserID"]; 
} 


The table I have uses UserID which is a unique autonumber and set as an int.

I would like to store the user record number on an Add Record form.

Change field value using button without refresh

$
0
0
Think of a shopping cart checkout.

I have a text field "qty" and a button "add" on list page for each row.

I want to add+1 to "qty" when the user clicks "add" and display the new value. I also want to save this new value to the database. I can do this easily by refreshing the page each click, but this looks clunky.

Any ideas? The pageid and ctrl.setValue() don't seem to be available from inside the button "Client Before".

Thanks for your help.

Filter totals incorrect on list page

$
0
0
If I check "Show Totals" on my filter page, and then change the Where clause in Before SQL Query I get the wrong totals.

My filter panel shows the counts from before the where clause is edited. Any idea how to get around this?

get data from details into master on add page

$
0
0
Hello,

I really hope someone could guide me through this. Please see picture for reference

Posted Image

I am trying to get the totals from the details page to calculate subtotal in the add page from the master table. I am not sure how to even start. I can do all the calculations on Javascript onload event. the issue is how can I get the data from the details page into the masters page?

Thank you

Connection problem over https/HTTP2.0

$
0
0
Hello

I have been using PHP Runner for years - and I really love this software! But now my service provider was moving all my stuff to a new server and I have not been able to connect to the new database using phprunner.php. The connection seems to work fine when tested in browser, but using the same information inside PHP Runner it does not work. I do not know much about the technical side, but the guy told me to ask if there was a problem to connect phprunner.php over https/HTTP2.0.

Best regards
Jonas Helgason

Create Report Account Balance

$
0
0
is There any way to Create View to sum Total Running Balance (Credit debit)
My Query running well, but I can not save in View or Compile to PHPRunner.
------------------------------------------------------------------------------
set @balance := 0;
SELECT TransactionNumber, Account, Date, debet, Kredit, (@balance := @balance + (debet - Kredit)) as Balance, Remark
FROM financetransaction where account = 3
ORDER BY Account, date;
group BY Account, date, TransactionNumber

-------------------------------------------------------------------------------

Thanks in advance.

Style Message

$
0
0
Hi. I cannot find any info on how to style the standard Message used to display info in the edit page.

Can anyone point me to the info or share some?

Thanks in advance and best regards

[SOLVED] Javascript to update list page field on specific row

$
0
0
Hi, for a list page with a shopping cart I have + / - buttons for each row. I also have qty display value.

I want to access the quantity field on a button row and use getElementById("database_row_id") or to change the displayed value and update that row without refreshing.

How can I identify that row "id"? They seem to start at 4. eg: <span id="edit4_quantity">6</span> is the first row. I want to match it to the databaseid or get that "4" in the button events.

I've tried inserting a code snippet to achieve <span id="databaseid"></span> but snippets can't access $pageObject->getCurrentRecord() to insert the item id for each row.

I've tried editing the html to add <SPAN ID="{$ID_value}"></SPAN> but the {$ID_value} includes it's own SPAN "ID", it inserts more than the value.

Any ideas? Thanks.

Phprunner 8.0 can't open

$
0
0
Hello advanced members,

I have an issue regarding my phprunner 8.0; I have been using it one year and 2 weeks ago I tried to open it, but unfortunately it doesn’t’ open. I have reinstalled it several times but there is no response.
Do you know which kind of source of this?

Thanks

Dynamic modifying LEFT JOIN

$
0
0
I have a query like this:

select * from master_tbl
left join child_tbl on child_tbl.parent=master_tbl.id and child_tbl.username='john'
where master_tbl.data=1


simply I want to replace the ON condition child_tbl.username='john' by the logged in user's user name child_tbl.username=$_SESSION['UserID'] (syntax omitted here)

I tried doing it by preg_replace at List Page: Before SQL Query, then the page will generate php error telling SQL syntax error while querying something like

SELECT count(*) from child_tbl) as t1 on ...

(yes there is an unpaired bracket)

In the error page detail, the call stack show that error occurs when PHPR tries to call GetRowCount.

Any substitute method to this?

Extracting Initials on export

$
0
0
I need to use full names of 1 or more students in a field (studentname) on the website (phprunner) but on the export to excel I need that field to convert all student names to only the initials of first and last names. I have tried a couple of php snippets and one javascript snippet that I found on stackoverflow, but can't figure out how to adjust them to work. I suspect that this is pretty simple bit of code, but can't find a way to pull it off.
Viewing all 2520 articles
Browse latest View live