Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
4
Erster Beitrag:
vor 4 Jahren, 11 Monaten
Letzter Beitrag:
vor 4 Jahren, 11 Monaten
Beteiligte Autoren:
NadineN, Allard, Fabrice Harari, NadineNo

WebDev: Popup or page when clicked on tablerow

Startbeitrag von NadineNo am 20.06.2013 14:15

Hi all,

I've switched from WinDev to WebDev (17) and the difference between them is very large. For instance, I've been told that working with pop-ups will slowdown your application. The proper solution is to work with pages. But how can I show the details of a record that has been clicked in a table? For instance: I've got a table with projects and when I click on a row I would like a new page to open, with the details of my project.

Is that possible or isn't that the way of working in a webapplication? The on click event of the table (Browser code) doesn't recognize a dynamic page so how can I do that??

"Error:'PAGE_Kaderdetail' is a dynamic page. This parameter of PageDisplay must be a static page, a PHP page or an AWP page.PAGE_Kader.Table_FrameProfileTopRight, Click (onclick), line 1, column 13"

(there is no time to learn PHP or AWP)

Thank You for your answer.

Antworten:

Hi

Of course the difference is large... You are creating a web site, with all the constraints that this implies!

Now I don't know who told you that pop up would slow down a web site. Opening a Popup or a new page is going to invlive the same data transfer from your site.

Now, to show the details of a record from a page, you can either use celldisplaydialog (with a cell from the same page) or open a popup (in fact, webdev 18 is offering to transform celldispladialogs into popups)

One way to do this nicely is the following:
- create a button to open the detail, and check ajax in the server code section
- in the browser code section, do your celldisplaydialog
- in the server code section (run via ajax) do your record reading and fields value settings

your cell is displayed, and shortly thereafter, the fields are set with the record value

Best regards

von Fabrice Harari - am 20.06.2013 14:26
Hi
What kind of page do you have for I do not understand you Error message?

To get what you describe you will probably need dynamic webdev or php modus. You do not have to lurn anything just set the page to be dynamic.

This is quite basic. And really not that difficult.
Make the table an ajax table. If it is an Ajax table then the rows are recognized. This means that you can use it like this
Hreadseekfirst(file, fileid, tablename)

Now with a popup.
Browsercode :
Popupdisplay(popupname)
In the on click event of say a button activate ajax ( otherwise the popup disappears )
Make some controls in the popup
In the button click code ( if you use a button to display the popup window) add:
Hreadseekfirst(file, fileid, tablename)
Edt-control = file.name
etc, etc
The popup window will now show the contens of a file

With a new window
You have to use some parameters.
Do a hreadseekfirst() on the table to find out the id you want
Pagedisplay ( mypage, fileid)
On the page retrieve the value of the parameter with
Fileidthatyouwanttouse is int = pageparameter(1)
In the new page you can use the parameter . If you pass two parameters then the second parameter is parameter(2)

Regards
Allard

von Allard - am 21.06.2013 11:09
Thank You both for your answers :spos:
I'll discuss it with my colleague.

von NadineN - am 21.06.2013 14:49
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.