Hello
I have a problem with executeScript() in a KHTMLPart.
Mr. bcooksley from KDE Forums recommended sending an email to you.
I want to execute external scripts in websites.
The folowing does the job:
##################
...
m_part = dynamic_cast<KHTMLPart *>(parent);
connect(m_part,SIGNAL(completed()),this,SLOT(slotApplyScript()));
...
void slotApplyScript()
{
...
if (!scriptContent.isEmpty()) {
m_part->executeScript(scriptContent);
}
}
##################
but if the script contains something like:
##################
document.getElementById('someElID').innerHTML = '<object
data="someDataPath"></object>';
document.getElementById('someElID').innerHTML = '<embed
src="someDataPath"></embed>';
##################
KHTMLPart loads, it executes the script,
then it seems like is loading "someDataPath" like a new document too,
so it executes the script again, therefore an infinite loop.
I'm using konqueror-4.4/qt-4.6 on Gentoo.
Can you help me with this?
Thank you!
Kind regards,
Sebastian Luncan
Powered by Tux & GNU
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<