Virtual Mechanics: Community Forums and FAQs
Virtual Mechanics: Community Forums and FAQs
User's Created Tips and Insights
Javascript Functions|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
Guru 'Power' Mechanic![]() |
Sometimes it can be useful to invoke a Javascript function from a click or mouseover. You might use these to produce sounds or display images in a particular manner. Just about anything you can do in a Javascript function you can also do from a SiteSpinner link.
Javascript with a click Invoke a Javascript function from a SiteSpinner link (on image or text) like this: Link type: -blank- Link URL: javascript:MyFunction() Notes: Javascript with a mouseover Invoke a Javascript function from a mouseover by setting a SiteSpinner link on an object like this: Link Type: -blank- Link URL: javascript:void('AnythingYouLike')"onmouseover="MyFunction()" Notes: This message has been edited. Last edited by: Bruceee, |
||
|
Honorary 'Adroit' Mechanic![]() |
you should lose the last set of double quotes in the link statement example above.
rationle: VM is producing code of the form <A HREF=" whatever your link statement is "></A> so it provides the first and last double quotes for you. |
|||
|
Guru 'Power' Mechanic![]() |
You're right -- that variant also works and has the advantage of being slightly simpler. The AnythingYouLike does not seem to need quotes either. So here's the amended line:
Link URL: javascript:void(AnythingYouLike)"onmouseover="MyFunction() |
|||
|
|
Working Mechanic |
Hi Bruceee,
I'm not too sure where to ask this question - and I'm not at all sure it concerns SiteSpinner! - but here goes: My site needs to be viewed in FULL SCREEN mode so this page - and 300 others - on my site http://www.LOCHORAMA.COM/81.html prompts users to press F11 (or F10+a+l if they're using a French keyboard). HOWEVER, probably due to the presence of my java applets, pressing F11 fails to open Fullscreen mode - at least that is the case on my keyboard and a lot of other folks. So French people have to press F10 + A + L - and God knows what key sequence English people have to utilize. Question: would you happen to know how I could make my "enter Fullscreen mode" button clickable - via a Java script or someother means - by people using keyboards of all nationalities? Thanks in advance Bruceee. And keep up the good work. SS is the best software I ever bought! |
|||
|
Guru 'Power' Mechanic![]() |
See this thread.
|
|||
|
|
Working Mechanic |
Hi Bruceee,
What kind of use were you thinking of? I know I am being really dim here. I am migrating from a different program so finding my way around Sitespinner, which I am REALLY enjoying. Best wishes. Ali |
|||
|
|
Guru 'Geezer' Mechanic |
A small suggestion: change javascript:void(AnythingYouWant) to javascript:void()
Since the Void function is going to throw away any values you pass it, save some time and pass it nothing. Also, it is better to use the javascript:void() instead of a URL of "#" when you want a null link. The "#" reference is used to signal a bookmark which causes the browser to look for a null bookmark. If you page uses bookmarks, you could get unexpected results. |
|||
|
|
Working Mechanic |
Hi
Now I see. That is so handy. Thanks for taking the trouble to reply. Ali |
|||
|
| Previous Topic | Next Topic | powered by eve community |
| Please Wait. Your request is being processed... |
|

