Jump to content
uniGUI Discussion Forums
Sign in to follow this  
zemorango

Unisession.AddJs for elementes inside a UrlFrame

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.

 

 

 

 

Share this post


Link to post
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.

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites
On 11/21/2018 at 1:50 PM, delagoutte said:

it is attach to this message

framecommunication.zip

 

in directory \exe\files\  there is the html frame page

Fantastic sharing delagoutte, thank you so mush :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×