shadowbox setup with javascript function as argument

classic Classic list List threaded Threaded
2 messages Options
TJA
Reply | Threaded
Open this post in threaded view
|

shadowbox setup with javascript function as argument

TJA
Can I do this:

function tabClicked()
{
...
};

Shadowbox.setup(javaScript:tabClicked())
TJA
Reply | Threaded
Open this post in threaded view
|

Re: shadowbox setup with javascript function as argument

TJA
I have a page with a number of links. Some have href=URL, some have href=javaScript:tabClicked(URL). We used a shdowbox for some of the links with the URL, and I am trying to do the same for one of the links which is bound to tabClicked. How can I do this? My first attempt (below) gets "tabClicked not defined" error.

This code is in a Javasript file. It finds all  tags on an HTML page which conatin a certain string and passes their href values to shadowbox.setup(). Some of the  tags have an href of the form javaScript:tabClicked(URL).

function tabClicked(URL)
{  
    do stuff.  
    follow URL.  
};

shadowbox.setup(javaScript:tabClicked(URL))