Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
showlink target option does not work
15/08/2010
22:32
Avatar
ram2010
Member
Members
Forum Posts: 43
Member Since:
13/01/2010
sp_UserOfflineSmall Offline

Hi

I have implemented the showlink functionality as described here: /jqgridwiki/doku.php?id=wiki:predefined_formatter#predefined_format_types

Below is the html code that is rendered

<a href="qa/goToReportList?reportId=2″ target="main">1900x</a>

I have 2 problems:

1) the target attribute opens up in a new browser. Why is this happening? I have a div called 'main' and I want the html to be rendered in that div and not a new browser window.

2) I am getting the following error on my new page in firebug console & nothing is displayed:

$ is not defined
error source line: $ is not defined. $(document).ready(function () {
why is this error happening?

many thanks

23/08/2010
14:59
Avatar
ram2010
Member
Members
Forum Posts: 43
Member Since:
13/01/2010
sp_UserOfflineSmall Offline

The 2nd error is caused because a new jsp page is loaded and this new jsp doesnt have jquery.

If the target attribute worked properly and loaded in the div, then I will have jquery already loaded and will not get the 2nd issue.

Has anyone successfullyu implemented showlink? if so, does it load the result properly into the target dive?

thanks

23/08/2010
17:15
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hi!

I use 'showlink' like following

formatter: 'showlink', formatoptions: { baseLinkUrl: 'javascript:',
                                                          showAction: "MyBase.GetChangeData(jQuery('#list'),'",
                                                          addParam: "');"
}

to call global MyBase.GetChangeData function. The function GetChangeData which has prototype function (grid,param) I start with following code

var ar = param.split('=');
if (grid.length > 0 && ar.length === 2 && ar[0] === '?id') {

    var rowid = ar[1];
    grid.setSelection(rowid); // or some other usage of jqGrid

   …

}

It can be not the best example of the usage of 'showlink' but it works in my code.

Best regards
Oleg 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
71 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information