News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Need to add a couple buttons

Started by djoos5, November 09, 2009, 09:49:07 PM

Previous topic - Next topic

djoos5

With the palmtoface and headtodesk, am I causing you a headache yet?

Here is what came up on the Error on Page details:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; yie8)
Timestamp: Thu, 12 Nov 2009 00:50:52 UTC


Message: 'return' statement outside of function
Line: 1
Char: 159
Code: 0
URI: http://rpg.avioc.org/boards/index.php



Arantor

This is what I get for mixing languages and answering several things at once that are all kind of similar. Take out the return false; part, thus:
'dice' => array(
'title' => 'Dice Roller',
'href' => 'http://rpg.avioc.org/dice.htm',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'href' => 'javascript:window.open(\'http://rpg.avioc.org/dice.htm\', \'DiceRoller\', \'width=518,height=410,toolbar=no,statusbar=no,menubar=no,location=no,scrollbars=no,resizable=no\');',
),


Normally I'd attach functions to events such as onclick which would require return false, but here it has to not be done.

djoos5

Thank you! It worked to open the window like I wanted it to be!!  :)

But....

The forums page behind it, in the browser, went blank and was left with nothing but [object] (see printscreen below)...

I am hoping this is an easy fix, because if so, I promise to leave you be!  ;D

djoos5

Thank you! It worked to open the window like I wanted it to be!!  :)

But....

The forums page behind it, in the browser, went blank and was left with nothing but [object] (see printscreen below)...

I am hoping this is an easy fix, because if so, I promise to leave you be!  ;D

Arantor

There's an ugly solution to it, but it took me a while to figure it. I was half way there earlier and forgot about this.

'dice' => array(
'title' => 'Dice Roller',
'href' => 'http://rpg.avioc.org/dice.htm',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'href' => '#" onclick="javascript:window.open(\'http://rpg.avioc.org/dice.htm\', \'DiceRoller\', \'width=518,height=410,toolbar=no,statusbar=no,menubar=no,location=no,scrollbars=no,resizable=no\'); return false;',
),

djoos5

PERFECT!!

Thanks for all your time and your valuable knowledge! My site is the way I have wanted it now for about 4 years!

Thanks!

Arantor


Advertisement: