Javascript variable help[solved] - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Skype & Technology (/forumdisplay.php?fid=9) +---- Forum: Tech Talk (/forumdisplay.php?fid=17) +----- Thread: Javascript variable help[solved] (/showthread.php?tid=56033) Javascript variable help[solved] by QtanJ on 02-19-2006 at 08:12 PM
I have a IPB forum v.2 and want a spoiler tag. Since I don't want to modify my IPB forum yet, I want to use custom bbcode. I've got this code, but don't have a clue of how I make a variable decide what id number every spoiler need. code: {content} is right, i've testen and that part works. If I make it {option} then I can make something like this to get it work with more than one each page code:What's wrong with this solution is: 1. You have to write something unique after = in every spoler tag 2. If you quote you need to change the id of the spoiler if you don't want the second spoiler to be a remote control of the first one. The random number don't have to be a random number multiplied with that numeber i chose there, but it needs to have many choices since i don't like remote controls. To test if your solution works, just make a html file with two or more spoilers and check if the second one works and that it isn't a remote control. As the code is now it should work once in each page since the id of every spoiler is value. Thanks for every answer. RE: Javascript variable help. by ShawnZ on 02-19-2006 at 08:16 PM Almost impossible to do without modifying IPB. you'd at least need to convert them to DIVs with IDs before you can do anything useful with them. RE: Javascript variable help. by QtanJ on 02-19-2006 at 10:28 PM
I've managed to make it. The sourcecode looks like a mess, but at least it works. Feel free to use it as you like as long as you want. code: Sorry, I didn't express myself how I needed help clear enough, but case solved. RE: Javascript variable help[solved] by -dt- on 02-20-2006 at 03:31 AM wtf is with the document.write ewwww , have you heard of using document.createElement and then appendChild it into the document. RE: Javascript variable help[solved] by QtanJ on 02-20-2006 at 01:58 PM
Actually no. Javascript isn't the computer language I know best. When it's about websites I usually program in PHP, but in this case I couldn't use it. |