Jump to content

Unisession.AddJs for elementes inside a UrlFrame


zemorango

Recommended Posts

Hi Guys

I'm using a urlframe to load data to an jqwidgets jqgrid. I'm using jqgrid because it have more filters options.

the id of the jqgrid is "grid"

Now I want to change values in the grid using unisession.addJs,    I'm trying to change the values of a cell,  like this ;

unisession.AddJS('$("#grid").jqxGrid(''setcellvalue'', myrow , ''mycolumn'', ''mynewvalue'');' );

and I get this error    :  Invalid Selector - #grid! Please, check whether the used ID or CSS Class name is correct.

Any idears or work arrounds?

Link to comment
Share on other sites

1 hour ago, delagoutte said:

if you use your webbrowser inpesctor, your grid have the good Id ?

Hi Delagoutte,

 

yes I se the good Id,

 

My code is this

image.png.de2b92db11aeb98ffd907ed7bf4ef516.png

 

The Result of the grid in Unigui  URLFrame is this,  so it works great.

image.thumb.png.f76bf5c5a9bbc7abc3f207c83b937b62.png

 

In the webbrowser inspector I see the ID "grid"

image.thumb.png.2af6ac29dfd5edcec924657668b28470.png

So maybe this is a restriction of the URLFrame,  I could use the HTMLFrame but its not working correctly because some there is some incompatibilities with the jquery version used by the jqrid, I works in the first load, but if a make a new query then I get errors,  so I need to use UrlFrames.

 

 

 

 

Link to comment
Share on other sites

yes, i think it is a protection/restriction problem.

i had this problem, for this, i implemented a communication "protocol" between unigui application and iframe based on postmessage.

i use this sample : https://gist.github.com/pbojinov/8965299

it is simple to adapt in unigu but if you want i could retreive the sample that i made.

Link to comment
Share on other sites

On 11/16/2018 at 9:52 AM, delagoutte said:

yes, i think it is a protection/restriction problem.

i had this problem, for this, i implemented a communication "protocol" between unigui application and iframe based on postmessage.

i use this sample : https://gist.github.com/pbojinov/8965299

it is simple to adapt in unigu but if you want i could retreive the sample that i made.

Hi delagoutte, fantastic, could you please give me the sample that you made?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...