JS Quiz Program Opens Empty Tab After Click - Any Ideas Please?

Discussion in 'JavaScript' started by Aitch, Dec 20, 2011.

  1. #1
    Hi Folks

    I've got this new quiz program that's driving me nuts! When using it in Firefox, after clicking the evaluate button a new ‘blank’ tab is opened which will obviously be confusing for users.

    I'm not 'JS' savvy but did find a place in the evaluate page code that had the following: <base target="_blank"> But even after deleting that, I still get the blank tab after clicking the evaluate button.

    I've had a couple of mates try this from their computers and they too confirm this problem with FF.

    Just wondering if anyone who knows about these kinds of things might be able to spot the issue in code view and tell me what I have to do in order to correct the issue?

    Here's a sample

    Btw, I have contacted the vendor over the past few days but as yet have not had a reply, hence the cry for help in here.

    Thanks in advance

    Andii
     
    Aitch, Dec 20, 2011 IP
  2. proactiv3

    proactiv3 Peon

    Messages:
    55
    Likes Received:
    7
    Best Answers:
    4
    Trophy Points:
    0
    #2
    On the file alcohol_test.js, line ~256 you have something like this:

    cachewrite("<html><head><title>Results</title><BASE target='_blank'></head><body bgcolor='#FFFFFF'><font face='Verdana, Arial'><table border=0 cellpadding=0 cellspacing=0 width='100%' bgcolor='#C0C0C0'><tr><td width='100%'><font face='Verdana, Arial' size=5 color='#FFFFFF'><b>&nbsp;Results</b></font></td></tr></table>",0)
    Code (markup):
    Try changing it to:

    cachewrite("<html><head><title>Results</title></head><body bgcolor='#FFFFFF'><font face='Verdana, Arial'><table border=0 cellpadding=0 cellspacing=0 width='100%' bgcolor='#C0C0C0'><tr><td width='100%'><font face='Verdana, Arial' size=5 color='#FFFFFF'><b>&nbsp;Results</b></font></td></tr></table>",0)
    Code (markup):
    Just remove the BASE target tag from the head.
     
    proactiv3, Dec 20, 2011 IP
  3. Aitch

    Aitch Well-Known Member

    Messages:
    113
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #3
    Hi proactiv3, and thanks for your suggestion, I appreciate that ;)

    There's been an update since writing this, so you might just want to skip here and go to that. It's an odd situation nonetheless.


    I was actually getting quite excited as I made the changes suggested. Unfortunately, the blank tab still returns to haunt me :(

    I even tried changing the code to <BASE target='_parent'>, but continue to get the empty tag. I have cleared the FF browser cache and reloaded it. but still no change.

    The odd thing is, when the text is highlighted on the evaluation page, and the the section source viewed, i still see this:

    <html><head><title>Results</title><base target="_blank"></head> Yet when I open the modified alcohol_test.js file from the server side, my changes are saved and the above is nowhere to be seen. Its most odd.

    Any more suggestions would be great, otherwise I guess I'll just have to put up with the annoyance because the vendor has chosen not to respond just a few days after purchase :mad:

    Thanks once again

    Andii
     
    Last edited: Dec 21, 2011
    Aitch, Dec 21, 2011 IP
  4. Aitch

    Aitch Well-Known Member

    Messages:
    113
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    103
    #4
    UPDATE: Some great news proactiv3 I closed down FF and cleaned my browser cache using a program called CCleaner. I couldn't see why this would make any difference, but everything is worth a try when all else fails I guess. Anyhow, it worked :) Code removed as suggested in the alcohol_test.js file, then re-uploaded to the server, and browser history cleaned using CCleaner (although it says it only cleans the same stuff as FF privacy options).

    Anyway, i'm a very happy camper, you're a star..

    Andii
     
    Aitch, Dec 21, 2011 IP
  5. proactiv3

    proactiv3 Peon

    Messages:
    55
    Likes Received:
    7
    Best Answers:
    4
    Trophy Points:
    0
    #5
    Great, I'm a star (LOL)! :)

    Good luck with your project.
     
    proactiv3, Dec 21, 2011 IP