![]() |
How do I get javascript to work in BBcode?
I trying to implement a BB-code that uses java-script, but I can't get it to work.
I wanted to make an [IMG]-tag that restricted the size of the image to a pre-defined width. Both code-examples works like a charm when I have them in ordinary HTML-files on my computer. When I insert the first code, weird things happens. When I load the page, the tag does not resize the image to the restricted size, but it displays the image. However, if I enter edit-mode, and then save the post, the images get resized. In my code example below, width is restricted to 500px. Code:
<script type="text/javascript"> The second code that is supposed to manage this diplays nothing at all. No BBcode tags are visible in the post, no photos either. Code:
<script language="javascript"> regards, Dr. Mabuse Admin, Skepticality Forum |
What tag are you using? If you're using IMG, try using something else.
|
I created a new BB-tag I named [test].
Dr. Mabuse Admin, Skepticality Forum |
Try this
Code:
<script type="text/javascript"> |
Quote:
I tried your code by copy-and-paste in case I missed something else, but it still didn't work, the image only resize after you click the edit button. regards, Dr. Mabuse |
Anyone?
|
All times are GMT. The time now is 04:01 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|