JQuery Code modification needed

error77
error77 used Ask the Experts™
on
Hi all,

I need to tweet some functionality a bit.

Right now I am using this code:

$('body').ready(function() { self.open(); });

I have some links from Page A to page B.

I basically want this popup ONLY to open if it's coming from one of these link on page A

Is that tweek possible please?

THanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Set a variable window.doPopup = true; in Page A, then do if ( (window.opener.doPopup) ) {...} in Page B.

Author

Commented:
Good idea although the only proble is that the code:

$('body').ready(function() { self.open(); });

is actually in a .JS file and not on page B ... would that be a problem?

Author

Commented:
Basically I have a few links...

<a id="link1" href="link1.com">Link here</a>

Now ... I know that this code works:

$('body').ready(function() { self.open(); });

and popups the window, so I don't want to change that ..

I just need to wrap and IF which basically says:

If the refer link if Link1 then popup

example:

If (ID="link1") {
$('body').ready(function() { self.open(); });
}

or something like that?

Hope this helps

THanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial