Jump to content

move info in and out of javascript


westman
 Share

Recommended Posts

hi everyone long time no see ;) so let me get to it... i got php outputing a word or 2 and the word is diffrent every time in a link....

<a href="#" onclick="return false" onmousedown="javascript:boxsetup()"><?php echo $word ?></a>

now how do i get the php word to post to javascript "onmousedown" to put in a div?i have this so fear...

  function boxsetup() { alert("Hello World!");}

the alert box was a test only

Edited by westman
Link to comment
Share on other sites

:facepalm: look at this "getElementById" 'get element by id", what about this ""whateveridref" "whatever id ref" Now! where is the ID ref/name
<div id="title">here is where i need "theword"</div>

Please don't reply ' is it "theword" ' "whateveridre"->"whateveridr"->"whateverid"->"whateveri"->"whatever"->"whatevf"->"whatev"->"whate"->"what"->"wha"->"wh"->"w"->""->"t"->"ti"->"######"->"titl"->"title" represents deleting each letter of "whateveridref" then replace, and end up with correct id ref/name, which is.... (the' ######' is what the forum does when it takes the word as being used as Abusive, threatening, defamatory, racist, or obscene.

Edited by dsonesuk
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...