/    Sign up×
Community /Pin to ProfileBookmark

???It looks so simple but….

Ok, this one has got me aggrevated. I don’t really see anything wrong with this, but it’s not working.
I have a Flash file with this attached to a button:

getURL (“javascript:openAd()”);

And in a javascript file I have this:

function openAd () {
newWindow = window.open (‘www.metalblend.com’)
}

When I click the button I get an error “Object does not support this property or method” in IE.

Um…what am I doing wrong?

The actual reason I’m doing this is because flash isn’t letting me send variables with the URL like
myURL = ‘www.metalblend.com?stuff=5&things=10’
getURL (myURL,_blank);
When you click on it, Flash goes to this URL ([url]www.metalblend.com?stuff=5[/url]) and cuts off any variables from there on out. So I decided to send it to javascript to get the full URL sent, but this is giving me errors. Bascially all I want to do is have someone click on a button in Flash and go to a URL while also sending some variables at the end of it.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@steelersfan88Mar 27.2004 — your openAd function does not return a value.

I am not sure, but you should add to the end:[CODE]return newWindow.document.location.href;[/CODE]Or something like that, not sure about the document.location.href part.

Not sure I completely udnerstand what you need though!

EDIT: you could also use just: getURL(openAd()).
×

Success!

Help @Shawn 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 6.16,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...