/    Sign up×
Community /Pin to ProfileBookmark

Openin a normal link + short code with javascript

Hi,

I am quite new to javascript and am struggling since few hours now with this function.

I have Flash file where i call javascript function.

The flash function is call a img link and open it in a relay…

I would like to make this simple function on a javascript:
<a href=”http://www.mydomain.com/images/image.jpg” rel=”overlay”>

Here is my function that will not work:

[CODE]
function openfromflash(map)
{
document.location.href = (map)+’ rel=”overlay”‘;
}
[/CODE]

Thank you in advance
caitanya

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@A1ien51Feb 17.2010 — There is no way to use rel with setting the location of the page. I am not sure why you want to use rel there anyway.

Eric
Copy linkTweet thisAlerts:
@caitanyaauthorFeb 17.2010 — well the idea is that i want to use internal popups out of flash AS3. There i've defined to call javascript and give over the parameter where the img is located. This works fine if i want to use external popups, but not with internal popups...

in a link i call my popups with: <a href="http://www.mydomain.com/images/image.jpg" [B]rel="overlay"[/B]>

Now in javascript i have to somehow add this rel="overlay" to the code and have no idea how...

thx for tips

caitanya
Copy linkTweet thisAlerts:
@A1ien51Feb 17.2010 — You want a pop up window? Than you can do window.open()

Eric
Copy linkTweet thisAlerts:
@caitanyaauthorFeb 17.2010 — yes but i need to implement the rel="overlay" into it...

how to do this?

[CODE]
function openfromflash(map) {
window.open (map,'rel="overlay"');
}
[/CODE]


the above function opens me a new window but the overlay does no work...

thx

caitanya
Copy linkTweet thisAlerts:
@caitanyaauthorFeb 19.2010 — nobody, i am still struggling...
×

Success!

Help @caitanya spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...