PDA

View Full Version : Parameter JSON in url of the IFRAME



Rafael
26 May 2009, 6:41 AM
items : { html: "<iframe src='http://localhost:8090/boleto/include/layout_itau.php?parametroBoleto="+ Ext.util.JSON.encode(dados) +"' style='border:0px; width: 100%; height: 100%;'></iframe>" }

this src is not a correct with json.
What is the correct ?

bool17
26 May 2009, 11:48 AM
I'm not sure what you are trying to achieve.

First of all I would avoid 'iframe'. Why don't you use e.g. Ext.Panel instead of?

Second, is this ready needed to pass JSON as a parameter? You may want to pass content of JSON as separate parameters. This would be much easier. But if there is a good reason, I would encode JSON by MIME (no idea how to do this using ExtJS) before processing. Also you may want to think about switching from GET to POST method. As I remember GET supports 1024characters long parameters or something about.