Page 1 of 1

Assign URL to Link-Object

Posted: Thu Jan 10, 2013 2:17 pm
by Bernie

How can I set the URL property of a "Link"-object with javascript?

The name of my object is "mobilelinkWebsiteResult".


Assign URL to Link-Object

Posted: Thu Jan 10, 2013 3:08 pm
by Kateryna Grynko

Hello,
You can set the URL property of a Link object using following JavaScript code:
codeTiggzi("mobilelinkWebsiteResult").attr("src", "http://...");/code


Assign URL to Link-Object

Posted: Thu Jan 10, 2013 4:41 pm
by Bernie

I tried this, but when I click on the link nothing is gonna happen:

Tiggzi('mobilelink4').attr('src', 'http://www.tiggzi.com');

Is there anything else I should add?


Assign URL to Link-Object

Posted: Thu Jan 10, 2013 5:23 pm
by Maryna Brodina

Hello! Please check if you are using correct object name


Assign URL to Link-Object

Posted: Thu Jan 10, 2013 5:52 pm
by Bernie

I checked and copied the object name from the property window. No changes.
I could solve the problem by using a local storage variable which I attached to the link properties.

Anyway, I would like to figure out what's the reason.


Assign URL to Link-Object

Posted: Thu Jan 10, 2013 6:07 pm
by Maryna Brodina

Try Tiggzi('mobilelink4').attr('href', 'http://www.tiggzi.com');


Assign URL to Link-Object

Posted: Thu Jan 10, 2013 6:15 pm
by Bernie

Now it works.
Thanks. You're always a great help