Re: [Wicket-user] Pure JavaScript calls from Links

2007-02-24 Thread Will Morton
Thanks Erik, Igor!

W

On 23 Feb 2007, at 17:39, Erik van Oosten wrote:

 Sorry, it is more something like WebMarkupContainer, not  
 WebMarkupComponent.

  Erik.

 Erik van Oosten wrote:
 Attach a simple WebMarkupComponent to your a. Then add a
 SimpleAttributeBehavior(onclick, foo();) to the component.

 Regards,
  Erik.

 Will Morton wrote:

 I am having some issues getting my Wicket application to work.   
 Any assistance would be much appreciated.

 I have a bunch of pre-defined JavaScript functions that I am  
 including in headers.  There are some links on my site that, when  
 clicked, should call one of these pre-defined JS functions.   
 However, I need to create these links using Wicket, because the  
 arguments to the functions are being pulled out of the database.   
 When the user clicks on these links, the JS function should be  
 executed, but the user's browser should NOT hit the website.

 I have tried creating Link objects and overwriting  
 getOnClickScript() to return the function call, and onClick()  
 with an empty method, however this empty onClick() stills seems  
 to make Wicket hit the website.

 From within my Page class, I want to create the JavaScript, and  
 have just that JavaScript execute, and nothing else to happen at  
 all.  Can anyone tell me how to set up my Link not to do this?

 Thanks in advance!

 Will





 -- 
 Erik van Oosten
 http://day-to-day-stuff.blogspot.com/


 -- 
 ---
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to  
 share your
 opinions on IT  business topics through brief surveys-and earn cash
 http://www.techsay.com/default.php? 
 page=join.phpp=sourceforgeCID=DEVDEV
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Pure JavaScript calls from Links

2007-02-23 Thread Will Morton
I am having some issues getting my Wicket application to work.  Any assistance 
would be much appreciated.

I have a bunch of pre-defined JavaScript functions that I am including in 
headers.  There are some links on my site that, when clicked, should call one 
of these pre-defined JS functions.  However, I need to create these links using 
Wicket, because the arguments to the functions are being pulled out of the 
database.  When the user clicks on these links, the JS function should be 
executed, but the user's browser should NOT hit the website.

I have tried creating Link objects and overwriting getOnClickScript() to return 
the function call, and onClick() with an empty method, however this empty 
onClick() stills seems to make Wicket hit the website.  

From within my Page class, I want to create the JavaScript, and have just that 
JavaScript execute, and nothing else to happen at all.  Can anyone tell me how 
to set up my Link not to do this?

Thanks in advance!

Will


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Pure JavaScript calls from Links

2007-02-23 Thread Igor Vaynberg

at the end of javascript you have to return false; this will prevent the
href from executing

-igor


On 2/23/07, Will Morton [EMAIL PROTECTED] wrote:


I am having some issues getting my Wicket application to work.  Any
assistance would be much appreciated.

I have a bunch of pre-defined JavaScript functions that I am including in
headers.  There are some links on my site that, when clicked, should call
one of these pre-defined JS functions.  However, I need to create these
links using Wicket, because the arguments to the functions are being pulled
out of the database.  When the user clicks on these links, the JS function
should be executed, but the user's browser should NOT hit the website.

I have tried creating Link objects and overwriting getOnClickScript() to
return the function call, and onClick() with an empty method, however this
empty onClick() stills seems to make Wicket hit the website.

From within my Page class, I want to create the JavaScript, and have just
that JavaScript execute, and nothing else to happen at all.  Can anyone tell
me how to set up my Link not to do this?

Thanks in advance!

Will


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Pure JavaScript calls from Links

2007-02-23 Thread Erik van Oosten
Attach a simple WebMarkupComponent to your a. Then add a 
SimpleAttributeBehavior(onclick, foo();) to the component.

Regards,
 Erik.

Will Morton wrote:
 I am having some issues getting my Wicket application to work.  Any 
 assistance would be much appreciated.

 I have a bunch of pre-defined JavaScript functions that I am including in 
 headers.  There are some links on my site that, when clicked, should call one 
 of these pre-defined JS functions.  However, I need to create these links 
 using Wicket, because the arguments to the functions are being pulled out of 
 the database.  When the user clicks on these links, the JS function should be 
 executed, but the user's browser should NOT hit the website.

 I have tried creating Link objects and overwriting getOnClickScript() to 
 return the function call, and onClick() with an empty method, however this 
 empty onClick() stills seems to make Wicket hit the website.  

 From within my Page class, I want to create the JavaScript, and have just 
 that JavaScript execute, and nothing else to happen at all.  Can anyone tell 
 me how to set up my Link not to do this?

 Thanks in advance!

 Will
   

-- 
Erik van Oosten
http://day-to-day-stuff.blogspot.com/


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Pure JavaScript calls from Links

2007-02-23 Thread Erik van Oosten
Sorry, it is more something like WebMarkupContainer, not WebMarkupComponent.

 Erik.

Erik van Oosten wrote:
 Attach a simple WebMarkupComponent to your a. Then add a 
 SimpleAttributeBehavior(onclick, foo();) to the component.

 Regards,
  Erik.

 Will Morton wrote:
   
 I am having some issues getting my Wicket application to work.  Any 
 assistance would be much appreciated.

 I have a bunch of pre-defined JavaScript functions that I am including in 
 headers.  There are some links on my site that, when clicked, should call 
 one of these pre-defined JS functions.  However, I need to create these 
 links using Wicket, because the arguments to the functions are being pulled 
 out of the database.  When the user clicks on these links, the JS function 
 should be executed, but the user's browser should NOT hit the website.

 I have tried creating Link objects and overwriting getOnClickScript() to 
 return the function call, and onClick() with an empty method, however this 
 empty onClick() stills seems to make Wicket hit the website.  

 From within my Page class, I want to create the JavaScript, and have just 
 that JavaScript execute, and nothing else to happen at all.  Can anyone 
 tell me how to set up my Link not to do this?

 Thanks in advance!

 Will
   
 

   

-- 
Erik van Oosten
http://day-to-day-stuff.blogspot.com/


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user