Forum


Hello Tony
I used to use this code with my old ajax code
jQuery("#dsEdit").click( function() {
var dsID = jQuery("#dsTable").getGridParam('selrow');
open_url('?option=modify&oper=edit&id='+dsID,'editDiv');
});
and it was working fine... till i needed to use an editor "TinyMCE" but the problem was when i call the editor page via ajax, the editor code won't work thats why i had to change the ajax code i used with the "Ajaxify" because it supports the events.
anyway, the Ajaxify code is
$('#dsEdit').ajaxify({
target: '#editDiv',
link: '?option=modify&oper=edit&id='+dsID,
onSuccess:
function(){
startTiny()
}
});
I wonder how can i pass the dsID from jqGrid to Ajaxify..
Thanks a lot Tony
Best regards
03:18

Moderators
30/10/2007

Hello,
What are all the parameters of ajaxify?
Can you add a function to the link parameter?
What you mean with grid does not work?
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
hi Tony
"What are all the parameters of ajaxify?"
Option | Value | Default | Note |
event | blur, focus, load, resize, scroll, unload, click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, mouseenter, mouseleave, change, select, submit, keydown, keypress, keyup, error | click | |
link | string | false | link to the page that are going to be loaded (instead of href) |
target | jQuery selector | body | you can use any method of jquery selection: #id, .class, element … |
method | string ( GET, POST, PUT, DELETE) | GET | (PUT, DELETE are not supported by all browsers) |
tagToload | jQuery selector | false | See examples about this option. |
loading_image | string | /ajaxify/loading.gif | Path to the loading image |
loadHash | boolean | false | See examples about this option. |
params | string | ajax=true | you may need to check if the visitor loaded this page via ajax or not. |
timeout | number | false | in ms. there is a bug in this option on linux servers |
contentType | string | application/x-www-form-urlencoded | it depends on loaded data. don’t change it if you dont know what it is. |
dataType | string | html | |
cache | boolean | false | control the browser to cache data or not. |
username | string | false | A usename to be used in response to an HTTP access authentication request. |
password | string | false | A password to be used in response to an HTTP access authentication request. |
onStart | function | false | A pre-callback to modify the XMLHttpRequest object before it is sent |
onError | function | false | A function to be called if the request fails. |
onSuccess | function | false | A function to be called if the request succeeds |
onComplete | function | false | A function to be called when the request finishes (after success and error callbacks are executed) |
more info: http://max.jsrhost.com/ajaxify.....ry-plugin/
"Can you add a function to the link parameter?"
I'm not that expert with ajaxify or js.
"What you mean with grid does not work?"
the grid is working fine till i add this function in between <head></head>
function getDsId() {
return jQuery(”#dsTable”).getGridParam('selrow');
}
because once i did.. the jqGrid doesn't work.. i mean it doesn't show any thing not even the table
regards
10:02

Moderators
30/10/2007

Hello,
You should add this function within
jQuery(document).ready(function(){...
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
hi again guys, the reason of making jqGrid doesn't work at all when i add that function was the "" because when i copy it i just paste it into the file without noticing it changed..
anyway. now the problem is everything works fine exept ajaxify, because it seems that its being called once the page is loaded not once i click the link.
i mean. because of
link: '?option=modify&oper=edit&id='+ getDsId(),
so ajaxify calls getDsId() once the page is loaded so i made this code.. and it works, the only problem is the ajaxify doesn't work from the first click so i have to click twice
one click to select the row
and two click on edit link
and here is the code..
.....
jQuery("#dsEdit").click( function() {
var dsID = jQuery("#dsTable").getGridParam('selrow');
if( dsID == null ) return null;
$('#dsEdit').ajaxify({
target: '#dsAjaxImages',
link: '?dsOption=modify&dsOper=edit&id='+dsID,
onSuccess:
function(){
startTiny()
}
});
});
.....
});
could anyone help with this...?
thanks again..
best regards
please check this out http://max.jsrhost.com/2008/10.....comment-36
it could be helpful to you.. so you can get a clear vision on the problem..
please.. guys.. i don't know what to do...
thanks a lot
03:18

Moderators
30/10/2007

Hello,
Please make alert here
....
jQuery(”#dsEdit”).click( function() {
var dsID = jQuery(”#dsTable”).getGridParam('selrow');
alert(dsID);
....
What you expect here?
Also check if the id support the right characters - google for id allowed characters.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
i really tried the aleart for the id to see if it works or not.. actually it is working..
but guys i'm not expert with js or jq or jqG or ajaxify..
i tried many many times to make work.. but its just useless..
guys.. all i needed is just once i click on the link.. it gets the id then open it via ajaxify..
i guess i could make it but not properly..
the first click on the link.. the ajaxify doesn't work but jqgrid gets the id
and the second click.. the ajaxify works depending on the previous click which the jqgrid got the id on the first click
i will really appreciate your help...
i really do need that to work
please guys, please.. help me out
best regards
03:59

Moderators
30/10/2007

Hello,
To identify the problem, please send a link to the page or send me
the problematic page with the data returned from server.
You can email me to : tony at trirand dot com
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
67 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66