Jamroom Logo Jamroom 5 Core
is now Open Source!
User Support Forum Archive (Read Only)
Jamroom Developers:
javascript with jmchoose
elygen



Joined: 22 Feb 2007
Posts: 637

Posted: 03/19/11 14:28 
how do you add javascript to the jmchoose function. Do you have to add onclick="..."?


_________________
~ Todd
=================
Happy Jamrooming
New Jersey
www.bandarray.com
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 03/19/11 19:25 
Off the top of my head, I do not believe you need the onclick part.

Kyle


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
elygen



Joined: 22 Feb 2007
Posts: 637

Posted: 03/20/11 06:52 
I have this but the javascript is not working


Code

jmChoose("Select Genres", "genres", getGenres(), '', 'yes', '', "Use the shift or control keys to select multiple genres",'',"onclick=\"alert('test')\"");


I also tried adding the onclick and that does not work.

What i'm tring to achieve is not allowing the user to select more than say 5 items in the jmchoose box.


_________________
~ Todd
=================
Happy Jamrooming
New Jersey
www.bandarray.com
Back to top
smith.kyle
CodeSmith


Joined: 27 Apr 2006
Posts: 22009
Location: Southern California

Posted: 03/20/11 18:28 
Try:

jmChoose("Select Genres", "genres", getGenres(), '', 'yes', '', "Use the shift or control keys to select multiple genres",'','alert("test")');


_________________
kyle[at]jamroom.net

Yes...that's a soda machine...

I get bored when no one's posting...
Back to top
elygen



Joined: 22 Feb 2007
Posts: 637

Posted: 03/20/11 20:14 
Im using the jukebox skin.

I found this code in the form.tpl file


Code
{if $_element.multiple == 'yes'}
            <select name="{$_element.name}[]" size="{$_element.height}" multiple="multiple" class="select{$error_class}" style="{$_element.style}">
            {else}
            <select name="{$_element.name}" size="{$_element.height}" class="select{$error_class}" style="{$_element.style}" {$_element.javascript}>
            {/if}


The multiple select did not have the {$_element.javascript} tag. I added it and it worked.


Thanks kyle.


_________________
~ Todd
=================
Happy Jamrooming
New Jersey
www.bandarray.com
Back to top
Display posts from previous:   
User Support Forum Archive (Read Only)
Jamroom Developers

 
Solutions
• Social Media Platform
• Social Networking Software
• Musician Website Manager
• Community Builder
Products
• Jamroom Core
• Jamroom Addons
• Jamroom Modules
• Jamroom Marketplace
Support
• Support Forum
• Documentation
• Support Center
• Contact Support
Community
• Community Forum
• Member Sites
• Developers
Company
• About Us
• Contact Us
• Privacy Policy
©2003 - 2010 Talldude Networks, LLC.