No announcement yet.

Javascript query

  • Filter
  • Time
  • Show
Clear All
new posts

  • Javascript query


    I have some javascripts I want to use - basically click a button and popup window, type thing.

    As these will be the buttons in the header would I therefore put the script in the header?

    And for those needed on the forum page (some the same) put that in the header of the forumhome file? (I don`t have the header called on the Home page, as it`s slightly different.)

    And does anyone know which file I need to alter to change the size of the window that opens when you choose `view in new window` for PMs? It`s way too big on an 800x600 screen.


  • #2
    Um, what?


    • #3
      Maybe try, I'm not exactly sure what you're talking about, but they have some great tutorials on a lot of stuff over there.
      - Andrew Pfeifer


      • #4

        I want to put a link on one of the pages so if you click it it opens a popup window.

        I`ve heard somewhere since I posted the above that you don`t allow Javascriipts on the board??

        Have a look here I`ve got 3 chatlinks at the top. They are not `popup` windows now I resized them in Dreamweaver, I`ll only have one when they`ve chosen their favourite, but I don`t want it there. I want it in one of my forums so only my members have access. Failing that, on the Forum Index page.

        So would I put the script in the header if I have the code that calls the Javascript in a forum, or within the head bit of the forum index if I have it just on the index. (the header is not called on the main page)

        Geez, even I didn`t understand that!

        All I want is to have my popup on my board, either on the index or within the forum. Mainly coz I don`t want them bypassing the board and going straight to the chat URL.

        Did anyone understand any of that??


        • #5
          PHP Code:
          script language="JavaScript">
          popup(urlheightwidth) {
          openWin"openWin""height=" height ",width=" width);
          body onLoad="popup('', 500, 500);"> <!-- pop up on load -->
          a href="javascript: popup('', 500, 500);">Pop Up Window</a> <!-- or popup on click -->
          edit: the javascript: popup thing is a bit messed up because of the vbulletin smilies and formatting... (javascript should be one word, not two)

          Like that? I didn't test it, I just wrote it down to see if that's what you're looking for...if that's the case, you can put it anywhere you want, but it's smart to put it in the <head> tags...i guess...


          • #6
            Ah I originally had a script like that I think on the old board, but then I thought I couldn`t do it on this, and just did a resized window in DW.

            So if I put that script in the <head> bit of the forum page, with an appropriate button or link it`ll be on the Main Page of the board, right?

            If I put it in Forum Display Header, it`ll appear on every Forum page won`t it? Is there no way to get it on just one forum page?

            As an aside, is there any way to get it so the popup doesn`t actually say on the window where it`s going? Those resized windows I did don`t give the game away, but ordinary popups always seem to. That way they have to use the link on the board, because they won`t know the direct chat url. If you see what I mean.

            And while I`m here I`ll just say I love, love, love VB! Compared with my old EZboard it loads really fast too.


            • #7
              Woohoo, done it!

              People didn`t like my mouseover effect, even though I put a lot of space between `em, so I made them plain ole links instead. I put this in the Forumhome <head> bit:

              function openpopup(){
              var popurl=""
              function openpopup2(){
              var popurl=""
              function openpopup3(){
              var popurl=""

              Works a treat. See Big Bad Board.


              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.