Jump to content

calling javascript inside a javascript


netcracker
 Share

Recommended Posts

how can i call a javascript (or the value returned by a js) inside an already opened and in execution javascript?more to the point, something like this:

   onClick="window.open('sendlink.html?link=[+document.URL]', '','')"

it should be quite easy, i presume, but my knowledge in js has its flaws... :)i think there should be some " or ' or { or .... please helpthx

Link to comment
Share on other sites

it should be like that...

onClick="window.open('sendlink.html?link='+document.URL, '','')"

but it is not... :) this way it sends exactly what it says...
sendlink.html?link='+document.URL

:) ...and not the value of "document.URL"[edit:]...{deleted}...[edit2:] :) damn, i hate modays!!!it works just fine! thx a lot dude !!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...