[prev in list] [next in list] [prev in thread] [next in thread] 

List:       konq-e
Subject:    Re: execute javascript from a defined javascript object
From:       Luciano Montanaro <luciano.montanaro () consulenti ! fastweb ! it>
Date:       2004-02-18 18:32:32
Message-ID: 200402181932.32215.luciano.montanaro () consulenti ! fastweb ! it
[Download RAW message or body]

On Tuesday 17 February 2004 13:14, caterina torrisi wrote:
> Hi all,
>  
> I need to know if there is a way to execute a javascript function defined in 
> the current html page from a javascript object that I defined. 
>  
> The function that I have to call has a parameter so I can't use the 
> KHTMLPart::executeScript( const QString &script) , which works well but the 
> script doesn't accept parameters. 
>  
> I tried to use the 
> KJScript::call(const KJS::UString &func, const KJS::List &args)
> but it causes a error like this: 
> "launcher: error sending launcherSlavePidCmd: Broken pipe" 
> 
> Can someone help me?
> 
> 
> Thanks,
> 
> 
> Caterina.

Well, you don't provide many details. However, the error message seems 
connected to the KIO subsystem.

Also, I think you are using a konqueror based on kdelibs 2.2, am I right?

I'm not much familiar anymore with that.
To pass parameters to the script, maybe you could use put() to assign 
or change some variable in the interpreter context, or you could supply 
extra functions to pass parameters to your script.

The script could call scriptFunction(yourObject.x, yourObject.y)
or yourObject.x() and yourObject.y() if you find that easier...

ciao
Luciano

PS I think plain text mail is preferred on this list
   
_______________________________________________
konq-e mailing list
konq-e@kde.org
https://mail.kde.org/mailman/listinfo/konq-e

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic