[wp-hackers] Playing with Divs through Javascript

sai krishna hodude81 at yahoo.com
Sun Mar 11 13:58:10 GMT 2007


>>I assume you are only want to do this on plugin activation?
  No, My Plugin is activated. I include a remote javascript file when in my add_mu function. Onclicking  an event the remote javascript is called which outputs a div object. Now when I'm trying put this div object back it gets misplaced. It appears always on the top-left of the browser both on IE and Firefox.
   
  The javascript output file being remote, I doubt the div output given by this is getting misplaced as the file is not hooked.
   
   
  

Peter Westwood <peter.westwood at ftwr.co.uk> wrote:
  sai krishna wrote:
> Hi,
> I do not know this is the right place to put this question or not. 
> 
> Question:
> Does wordpress allow use of javascript for plugin authors from other services, I mean like adding a remote javascript file from a different server to that of wordpress server. I did something like that. The div object returned is totally misplaced it goes to north-west of the browser, though I followed complete plugin Api rules.
> 

I'm not sure I fully understand the question.

Posting a link to the plugin code may help make it clearer.

> These are the rules I followed
> 
> function seed_adminmenu(){ 
> add_options_page('To Options', 'Test', 10, 'test', add_mu'); 
> }
> } 
> add_action('admin_menu','seed_adminmenu',10); 

> if (isset($_GET['activate']) && $_GET['activate'] == 'true') 
> { 
> add_action('init', 'truth');
> } 

I assume you are only want to do this on plugin activation? If so don't 
do this - use the plugin activation hook instead:
See register_activation_hook($file, $function) and 
http://wphooks.flatearth.org/hooks/activate_plugin-filename/

westi
-- 
Peter Westwood
http://blog.ftwr.co.uk
_______________________________________________
wp-hackers mailing list
wp-hackers at lists.automattic.com
http://lists.automattic.com/mailman/listinfo/wp-hackers


 
---------------------------------
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.


More information about the wp-hackers mailing list