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

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

Code:
"<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.



Randy

#12
[eluser]new_igniter[/eluser]
yeah, I could put the function there, but how would I write the function call through the inner HTML?

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

#14
[eluser]new_igniter[/eluser]
ok, I will try. Thanks so much for your patience/help Randy.

#15
[eluser]new_igniter[/eluser]
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.

#16
[eluser]new_igniter[/eluser]
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.

#17
[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...

onclick=\"alert(postJID);\"

it should be

onclick=\"alert("+postJID+");\"

Randy

#18
[eluser]new_igniter[/eluser]
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!

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

#20
[eluser]new_igniter[/eluser]
Thanks so much Randy!!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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