• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
javascript help needed - please

[eluser]Randy Casburn[/eluser]
ok, I see, you anchor tag needs to be adjusted:

"<a href="java/script : void/(0);" class="group_link_small"click = " show/More/('div_loc'+post_ID); ">Create an album</a>";

corrected a couple things. This should do better for you. Please remove the slashes.


yeah, I could put the function there, but how would I write the function call through the inner HTML?

[eluser]Randy Casburn[/eluser]
OK...check my previous post.

ok, I will try. Thanks so much for your patience/help Randy.

it calls the function fine. I guess I am having problems with getting the value passed through the first function into the second function. Do you know the method of doing this? It always the variable is undefined.

please see this file. I cant get the value from the original function. when it tries to do the alert, it just says 'postJID is undefined' in the error log.

[eluser]Randy Casburn[/eluser]
Yes -- I'm certain you have to concatenate the variable rather than put it into the string. I should have caught this the first time...

rather than this...


it should be



works great. I almost embarrased to ask this next question. How can I append some text? do that when I do the alert it would say "div_container_2002912", for example, with the 2002912 being postJID

Thanks so much!

[eluser]Randy Casburn[/eluser]
onclick=\"alert("+'My text that I want to show up in the alert box goes here! '+postJID+");\"

Thanks so much Randy!!

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.