User defined DC functions
-
Hey Remus,
Can you show me a example? That would be really helpful!
-
Well i tried it out, and using html to link to an image doesnt work unfortunately.
This should show how to link to an image using the imageURL attribute.
-
Can you show me how do I use imageURL with onClick function?
Thanks a lot!
Dhruv -
What sort of thing would you like to achieve? i think i can think of a way to change the picture on click, but your pretty limited in what you can do.
-
I am trying to open a hyperlink basically, when user clicks I want it to direct to web-browser.
-
Im not really sure how the imageURL attribute is going to help with that
-
Yeah, Dhruv the imageurl won't work with onclick. THe ONLY thing it is used for is to include a url for an image that will display itself in the component options box. The image never pops up or anything. It only displays when someone opens the options window.
So unfortunately there is no way to do what you want with the imageurl and onclick. Though that is good thinking, its just not built to do that.
Chris
-
Thanks Chris and Remus for your support
-
Hey Dhruv,
Just to add some "official" notes to your question:
There is no way (currently) to open URLs from an onclick interaction because of security/privacy concerns. We didn't want people spamming you with nasty website links that launch in your browser without you even knowing that a link was coming.
What we do allow is for html links that originate from inside the Component Options window. Just add something like this to your "description" attribute:
Click here to <a href="http://mysite.com">Visit my site</a>.
Then anyone selecting your component while the Component Options window is open will see your link.
It's not as sexy or simple as how you're requesting, but it provides that buffer that we felt was important... if you click on the link you don't know where it's taking you, but at least you knew it was a link.
-
Thanks Scott
-
Any chance that this can be adapted for opening a pdf saved in a common network folder?
-
I thought it would work just by replacing the internet url with a file version like:
file:///C:/Program%20Files/Google/Google%20SketchUp%207/Tools/Sandbox/images/tbflipperlarge.png
That did not work though. So I'm guessing they manually disabled linking to anything other than internet links. Porbably a pretty major security risk.
Chris
-
I tried this as well.
Avoiding the the security risk is appreciated, but the function that we are missing here has incredible potential.
To be able to have a 3D model as a visualization tool and for means of referencing to pdf documents and other files/programs would be the case study of case studies.I suppose I am stuck with using the ruby script URL. Just have to make sure that others have it installed as well.
I guess I could post the documents to a website, but that increases my security risks.
Don't know what to do, any suggestions?
-
That's a tough one. We chatted about allowing local files to be opened, but there are all kinds of security concerns with that, so we dropped it from V1.
I've added a feature request to our list so we can revisit it for future versions.
In the short term, might a password-protected web repository be suitable? You could give a password out to all of your users that allows them to get at the PDFs. If you set up the login to be cookie-enabled, they would only have to log in once and then could get at all of your resources.
-
Does it work if you have your network setup like an internal internet (I have no clue what I'm talking about). But I remember at a place that I worked in another life, you could type an internet url and it would access local servers only - intranet? If an office setup that type of system, would that work?
Chris - sorry for my juvenile netowrok knowledge and jargon
-
is it possible to have an alert popup with a link in it?
-
Advertisement