Link to home
Start Free TrialLog in
Avatar of addicktz
addicktz

asked on

Lightbox.js with asp.net button?

I am currently using lightbox.js ( http://www.huddletogether.com/projects/lightbox/ ) with some html links around my site. I would like to know how I can use this javascript with an asp.net button.

any ideas?
ASKER CERTIFIED SOLUTION
Avatar of tiagosalgado
tiagosalgado
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of addicktz
addicktz

ASKER

I found this in the .js, I am guessing this is the function I would want to be using, however, when I try to do a clientscriptblock, the page reloads with "LyteBox.prototype.start('http://www.aol.com','true','true')" at the top. Any ideas?

Function I found

LyteBox.prototype.start = function(imageLink, doSlide, doFrame) {.....}

My code to start the function

ClientScript.RegisterClientScriptBlock(this.GetType(), "script", "LyteBox.prototype.start('http://www.aol.com','true','true')");

Try this:

ClientScript.RegisterClientScriptBlock(this.GetType(), "script", "LyteBox.prototype.start('http://www.aol.com','true','true')",true);
the Page just reloads with no other activity, I have tried both the page_load and click event methods, any other ideas? any chance you could take a look at the lightbox.js file? my javascript is weak at best.

thanks
Have you add js file reference to your page?
yes it is in the <head></head>

Also, I am sorry, I am using http://dolem.com/lytebox/ which is a version of lightbox