The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Javascript Compatability?
Hi guys, I was told over @ vbulletin.com to post my ticket here as this is the place to ask. So here it is.
Quote:
|
#2
|
||||
|
||||
Why don't you post your page code and template here so we can take a look at it. Please use the code/html/php tags to enclose the code.
|
#3
|
||||
|
||||
The template is "dark futura". Are you sure you want me to post it all? It would flood the thread You can see the code by Right clicking the page and selecting 'View Source' on the third link above (Source File).
|
#4
|
||||
|
||||
You might want to read up a bit on including javascript in pages. You should define your script type:
HTML Code:
<script type="text/javascript">
HTML Code:
<!--
javascript
// -->
Just wondering, but.... you have the list spit out correctly in the first link, right? But the javascript isn't popping up a window, right? And the third link is to an html page which shows the working popup. And the second page is your working page (the one you are trying your code in) which is incorrect. I don't even see where you include the javascript in your second page, I just see it being spit out incorrectly. Try doing what I suggested above and see what the result is. |
#5
|
||||
|
||||
The Javascript has been taken out of the first link to show what it should look like.
I have added what you suggested. Yeah it still doesn't show. :/ |
#6
|
||||
|
||||
Where are you adding in the javascript in the second link? I don't see it being added anywhere. You should either have it added at the top, like you do the third link, or it should be added as a script like the vb javascript scripts. But, I don't see your's being added anywhere. That is the page I was asking about the source code for - the actual php code for the page that inputs the javascript.
|
#7
|
||||
|
||||
That's the problem. You see I used the "Add Page" function in vBAdvanced to create the page, I told it to use a HTML file and that third link is the file it's using.
Now for some reason as you just said, on the page it doesn't show and only shows that bit of text "') else writeln(''); writeln('" which is a snippet from the rest of the Java it seems to have ignored. But as you cn see in the source file it's all there. |
#8
|
||||
|
||||
That is an issue you will have to take up with on the vbadvanced forums then. I have no clue how to help using vbadvanced. I just know that that page is not correct for what you want to do. You need to include the javascript in the correct script manner, not from an html page.
|
#9
|
||||
|
||||
Ohhhh yeah, worked it out. Thank you Lynne for saying something that made me work it out.
Answer: Ok in order for custom Java to work in your pages you need to add the script into the global header. Because this is included in every page you need to make sure your variables are long and preferably complicated so there are no conflicts within the forum. Admin CP -> Styles & Templates -> Style Manager -> Expanding all the styles you want it to work in (<< >>) find in each one "headinclude" under "Forum Home Templates". Make a backup of the old headinclude and add your Javascript to the bottom of headinclude after ALL previous tags have closed. If your variables are as I suggested then you should encounter no conflicts and all should work fine. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|