View Full Version : Need onclick function to goto URL from smbutton
ByronD
Feb-27-2007, 04:37 PM
I have a basic navbar under my banner now, thanks to Ivar's excellent tutorial, but I am going to be using themes more on my site and I want to have a navbar that is more theme friendly rather than hardcoded with text and color values. This is especially important because I am going to have different themes for some of my major categories. I am considering using input buttons instead of list items with 'smbutton' class, but the problem I ran into is that the onclick handler for these needs to have a java function specified.
Is there a java function I can specify in an button's onclick handler that will goto a specified URL? I'v browsed around, but I don't know how to find a list of what java functions are available to me when customizing smugmug.
Site is creativeflashes.smugmug.com
Thanks!
ByronD
Feb-28-2007, 11:05 PM
Goodness, I thought this one was an easy one for one of the old hats around here, I didn't know it would be a stumper.
I'm all to the point of using lines like the following:
<input type="button" value="Guestbook" onclick="gotoURL(http://www.creativeflashes.com/gallery/2507057);" class="smbuttons" />
...instead of the line item lines as in the navbar tutorial, but I need to know the real name for the 'gotoURL" like function. The reason I wanted to use something like smbuttons was because it styles well for the various themes.
Thanks for anyone who can point me in the right direction.
Mike Lane
Feb-28-2007, 11:14 PM
Goodness, I thought this one was an easy one for one of the old hats around here, I didn't know it would be a stumper.
I'm all to the point of using lines like the following:
<input type="button" value="Guestbook" onclick="gotoURL(http://www.creativeflashes.com/gallery/2507057);" class="smbuttons" />
...instead of the line item lines as in the navbar tutorial, but I need to know the real name for the 'gotoURL" like function. The reason I wanted to use something like smbuttons was because it styles well for the various themes.
Thanks for anyone who can point me in the right direction.You can do this:
<ul>
<li class="smbuttons">stuff</li>
</ul>
It doesn't have to be an input button you know.
richW
Feb-28-2007, 11:18 PM
I can't say if this is the right way, BUT this is what I used on my search page (http://lmsportspix.smugmug.com/find/). I hope someone can point both of us in the right direction.
<FORM ACTION="http://www.creativeflashes.com/gallery/2507057/" > <INPUT TYPE="submit" VALUE="guestbook" class="smbuttons" id="cfp1"></form>
(BTW my search page is still work in progress)
Hope this helps.....
ByronD
Mar-01-2007, 04:31 PM
Mike, thanks for the info. Actually, I am on a steep learning curve with CSS, just deciding a week ago or so to learn it and customize and clean some things up on my smugmug site, so I didn't know you could use that class in line items. Doing what you mentioned got me to where I want to be.
RichW, nice site, by the way.
Mike Lane
Mar-02-2007, 02:48 AM
No problem :D You can apply a class to any item (or nearly any item, I can't think of any off the top of my head that can't be classed). It's a great idea to use the buttons or smbuttons class for that btw :thumb With minimal work you can keep the look of the theme. Nice going!
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.