• Hi all,
    Having a spot of bother creating a quicktag for a java popup script that I’m using…
    The scrip is this (in index.php)…

    <script language=”JavaScript”>
    <**!–
    function showImage(url, width, height) {
    imageWin = open(‘nothing’, ‘imageWindow’, ‘width=’+width+’,height=’+height+’,scrollbars=no,location=no,toolbar=no’);
    imageWin.document.writeln(‘<html><head>’);
    imageWin.document.writeln(‘<title>Ektopic Popup!</title>’);
    imageWin.document.writeln(‘</head><body>’);
    imageWin.document.writeln(‘<img src=”‘+url+'” width=”‘+width+'” height=”‘+height+'” style=”position: absolute; top: 0; left: 0; margin-top: 0; margin-left: 0;”>’);
    imageWin.document.writeln(‘</body></html>’);
    }
    //–**>
    </script**>
    (WITHOUGH THE ASTERISKS)

    The text that need to enter is this (in quicktags.js)…

    <**a href=”javascript:showImage(‘URL HERE’, WIDTH, HEIGHT)”>LINK TITLE<**/a>.

    (WITHOUGH THE ASTERISKS)
    I’ve tried to create the quicktag like this …

    edButtons[edButtons.length] = new edButton(‘ed_<‘
    ,’popup’
    ,'<**a href=”javascript:showImage(‘URL HERE’, WIDTH, HEIGHT)”>LINK TITLE<**/a>.’
    ,”
    ,”
    );

    (WITHOUGH THE ASTERISKS)
    …which is the same format that has worked fine for all the other quicktags that I’ve created, however, I can’t get this one to work.
    All that happens is that ALL the quicktages disapear!
    Any ideas please?
    Reevo

Viewing 2 replies - 1 through 2 (of 2 total)
  • Yeah, I see a potential problem. You have to break it out more:
    ‘blah-blah… Image(‘
    would be why it bonks. Maybe try (“URL HERE”, Width…

    Thread Starter reevo

    (@reevo)

    I hadn’t tried doing it in peices so I took your advice, thanks.
    I found that it was the apostrophes (‘) that were the trouble like you thought. It now works and looks like this…

    edButtons[edButtons.length] = new edButton(‘ed_<‘
    ,’popup’
    ,'<**a href=”javascript:showImage(LINK IN APOSTROPHES, WIDTH, HEIGHT)”>LINK TITLE<**/a>’
    ,”
    ,”
    );

    …it worlks a treat.
    Thanks for your time Beel
    Reevo

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Java popup quicktag problem’ is closed to new replies.