Subfile/Grid and client side execution
Posted: Fri Jan 07, 2011 3:21 pm
I have a subfile and in each row I have two separate hyperlinks that when pressed, I'd like to execute the URL contained in that hyperlink.
Each hyperlink would contain data(parms or whatnot) unique to that row in the grid.
The other thing I'd like is to have the column that is displayed for each of the hyperlinks NOT be the actual URL that I want to execute (I'd like it to be a name or something more user friendly).
From the RPG, I'd like to pre-fill all necessary information so that when they click on the subfile/grid, it does NOT have to return to the iseries to gather any additional information, but rather can immediately execute the "url"(hyperlink) that was clicked on.
I may be over complicating things, but I don't see an easy way to accomplish this (though I may very well be missing something). can you point me to an example that may be similar to what I'm describing (if it's possible)?
Thanks!
Here's the code I tried in the "onclick" of one of the hyperlink fields:
var GR2 = getObj("Grid2"); pui.link("Mailto1." + GR2.row + ".value");
The Mailto1 is another hidden hyperlink that contains the "link" I want to execute (in this case a simple mailto). I've tried a few different things, but basically, I was attempting to retrieve the row that was clicked (the hyperlink field was actually clicked) and then execute the Mailto1 from that row.
Each hyperlink would contain data(parms or whatnot) unique to that row in the grid.
The other thing I'd like is to have the column that is displayed for each of the hyperlinks NOT be the actual URL that I want to execute (I'd like it to be a name or something more user friendly).
From the RPG, I'd like to pre-fill all necessary information so that when they click on the subfile/grid, it does NOT have to return to the iseries to gather any additional information, but rather can immediately execute the "url"(hyperlink) that was clicked on.
I may be over complicating things, but I don't see an easy way to accomplish this (though I may very well be missing something). can you point me to an example that may be similar to what I'm describing (if it's possible)?
Thanks!
Here's the code I tried in the "onclick" of one of the hyperlink fields:
var GR2 = getObj("Grid2"); pui.link("Mailto1." + GR2.row + ".value");
The Mailto1 is another hidden hyperlink that contains the "link" I want to execute (in this case a simple mailto). I've tried a few different things, but basically, I was attempting to retrieve the row that was clicked (the hyperlink field was actually clicked) and then execute the Mailto1 from that row.