This is a migrated thread and some comments may be shown as answers.
Unable to open a popup window
2 Answers 37 Views
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Top achievements
Rank 1
scorp asked on 19 May 2011, 09:13 PM
I have a grid on one of my partial views with a template column with anchor text:I want to open up a popup window when the user clicks on the row passing in a parameter.

                                            onclick="javascrpt:ViewCourse('@item.CourseID')" >@item.CourseName</a>
                                            .Title("Course name");

When I click on the hyperlink on the grid nothing happens. I have the below javascript in the main view.

  <script type="text/javascript">
        function ViewCourse(CourseID) 
            var url = '@Url.Action("ViewCourse", "CourseCatalog")';
            $.post(url, CourseID,
                function (data) {
                var window = $('#Window').data('tWindow');


where Window is declared in the main view:

                              .Title("Course Description")
                              .Buttons(b => b.Maximize().Close())

2 Answers, 1 is accepted

Sort by
Top achievements
Rank 1
answered on 09 Jun 2011, 10:41 PM
I am having the same Problem. I hope someone replies!!
Atanas Korchev
Telerik team
answered on 10 Jun 2011, 08:17 AM

 Is the ViewCourse JavaScript function executed at all? What happens if you try debugging the code? Href only would suffice:

<a href="javascript: ViewCourse('@item.CourseID')" >@item.CourseName</a>

This is also an option (the href of a link must be set in order for it to be clickable)
<a href="#" onclick="ViewCourse('@item.CourseID')" >@item.CourseName</a>

Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question