This topic is locked

How to open dynamic link by displayPopup from the custom view window

10/25/2024 12:50:49 PM
PHPRunner General questions
A
Abbas author

from designer > control, I chose a custom to view the value with link by this code:

$value = "<a href='Student_Data_list.php?q=(SchoolID~equals~".$data["SchoolID"].")'>".$value."</a>";

How to use displayPopup function from custom to view window to display popup

A
Abbas author 10/25/2024
A
Abbas author 10/28/2024

I created a function and put this code in javascript onLoad event

function displayPopupWithURL(url) {
Runner.displayPopup({
url: url,
width: '50%',
height: '95%',
header: ''
});
}

in field control view as custom this code:

$value = "<a href='#' onclick='displayPopupWithURL('Student_Data_list.php?q=(SchoolID~equals~".$data["SchoolID"]."); return false;'>".$value."</a>";

But unfortunately it didn't work

Is there a way to open the pop-up from custom view code ?

Sergey Kornilov admin 10/28/2024

Your code looks like something that might work. Are you getting any Javascript errors?

Also, what is the exact HTML this 'View as' Custom code generates? You can do 'View source' of the page and see the exact HTML code.