Sigma Php Ajax framework, Ajax Components, GUI Builder
May 24, 2012, 10:48:34 AM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
Sigma Php Ajax framework, Ajax Components, GUI Builder
>
Sigma Visual GUI Builder & Library
>
Sigma Visual - Q&A
(Moderators:
steven
,
linb
) >
Making an Image Based Button or Link from an Image
Pages: [
1
]
« previous
next »
Print
Author
Topic: Making an Image Based Button or Link from an Image (Read 759 times)
unger
Jr. Member
Posts: 14
Making an Image Based Button or Link from an Image
«
on:
February 25, 2010, 07:51:26 AM »
Sometimes I need images to be links. For example I want the website logo to be a link to the sites home page.
Also I want to make certain buttons in a dialog that do not use the standard linb button images. I do not want to do this with a "skin" because it applies only to these specific buttons. I have been able to do something with specifying Custom Styles such as:
"BORDER" : "background : #FFFFFF url(img/leftarrow.png) no-repeat top left"
But I am not sure this is best way to do this. I also need to be able to control the mouseover and mousedown images and I haven't been able to figure out how to do this.
Logged
linb
Administrator
Hero Member
Posts: 435
Re: Making an Image Based Button or Link from an Image
«
Reply #1 on:
February 25, 2010, 04:30:58 PM »
Class('App', 'linb.Com',{ Instance:{ iniComponents:function(){ // [[code created by jsLinb UI Builder var host=this, children=[], append=function(child){children.push(child.get(0))}; append((new linb.UI.Image) .host(host,"image3") .setLeft(240) .setTop(160) .setSrc("http://www.google.com/images/nav_logo.png") .onClick("_image3_onclick") .beforeHoverEffect("_image3_beforehovereffect") .beforeClickEffect("_image3_beforeclickeffect") ); return children; // ]]code created by jsLinb UI Builder }, _image3_onclick:function (profile, e, src) { linb.Dom.submit('http://www.google.com'); }, _image3_beforehovereffect:function (profile, item, e, src, type) { linb.message(type); }, _image3_beforeclickeffect:function (profile, item, e, src, type) { linb.message(type); } } });
Logged
unger
Jr. Member
Posts: 14
Re: Making an Image Based Button or Link from an Image
«
Reply #2 on:
February 26, 2010, 08:21:20 AM »
I still don't see how to do this. Firstly there doesn't seem to be an onClick event associated with image component (like there is for a button). If I try to add the code to the JS manually VisualJS gives me errors when I try to look at the design view. It seems to me that the Image component should support an onClick event in any case.
«
Last Edit: February 26, 2010, 11:21:48 AM by unger
»
Logged
linb
Administrator
Hero Member
Posts: 435
Re: Making an Image Based Button or Link from an Image
«
Reply #3 on:
February 27, 2010, 12:45:17 AM »
Maybe your code is old version, update code from svn please!
Logged
cgetty
Jr. Member
Posts: 11
Re: Making an Image Based Button or Link from an Image
«
Reply #4 on:
October 04, 2010, 11:14:17 AM »
Hi all.
I wanted to do the same thing for the same reason.
I had to stop myself from making a new post and said to myself, "perhaps I should search the forum first".
Low & behold! I found the answer to my question.
I tested the code posted here & it worked.
Thank you unger for asking the question & thank you linb Moderator for the answer
Clark :-)
Logged
hillbilly programmer
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News & Announcements
-----------------------------
Sigma Visual GUI Builder & Library
-----------------------------
=> Sigma Visual - Knowledge Share
=> Sigma Visual - Q&A
=> Bug Report & Wishlist
-----------------------------
Sigma Grid
-----------------------------
=> Sigma Grid - Q&A
=> Show Case
=> Bug Report & Wishlist
-----------------------------
Other
-----------------------------
=> AJAX & JavaScript
Loading...