This topic is locked

redirect to edit page and list page row issues

11/4/2015 1:00:00 PM
PHPRunner General questions
F
fatma author

I'm new to phprunner and I'm doing a project (website) using it, I have two questions:
question 1:

I added custom button to school table view page and I want to [size="4"]redirect to edit page of rating table[/size] when this button is clicked, I added the following line

to clientafter event of button : location.href="rating_edit.php" I know I should add something to this line also which is the id(key of table rating) of record to be updated, where I should add this key ???
question 2:

In school table list page, I'm trying to display rating as stars for each school(for each table row). I know how to display stars using jquery plugin and it is working with me in view page, I need to add SPAN in html where I want to display stars and add jquery function to this span in javascript onload event.

My problem: in list page we have only [size="4"]one row displayed in visual editor and html[/size]. we have {BEGIN grid_row} before this row in html. I tried adding stars span inside row but it was displayed for the first row in table only and according not working because the rating value is a field in the row and it is different for each row.

I added span to row as follow:

<SPAN id="starOv" style="vertical-align: -7px;" display="inline"> </SPAN>
and in javascript I should do the following:

$("#starOv").raty({

hints: ['Terrible', 'Poor', 'Average', 'Very good', 'Excellent'],

readOnly: true,

score: ????

});

??? should be row field
How I can handle these two issues ???
Best regards

Admin 11/5/2015
  1. the question is where do you store the key column value of Rating table. How do you know which record in Rating table to edit while you are looking at the certain school?
  2. I recommend to check StarRating plugin:

    https://xlinesoft.com/marketplace/products_view.php?editid1=5
    No need to tinker with HTML manually.