Help with opening javascript links in new tabs with firefox.

Status
Not open for further replies.

vnf4ultra

Posts: 1,360   +2
Hello all.


I really enjoy using firefox's tabbed interface, and it works great for 99% of webpages, but one website I have to use uses javascript links, and when I middle click the links I get a blank page. I've tried the smart middle click extension for firefox, and also the javascript in new tab script for greasemonkey. Neither will work properly with the site. The greasemonkey script duplicates the original tab, instead of opening the desired page, while the smart middle click link basically does nothing on this site.

The links on the website are like this:
javascript:go2TechNotes('******')
the ****** is just letters and numbers.


Is there a way to modify the "javascript in new tab" script to make it work properly? If I could get it to duplicate the tab first, then run the javascript after the new tab has loaded, it would be great.

Here's the script I want to modify (it is ok to modify someone else's script right?).
http://www.arantius.com/misc/greasemonkey/javascript-in-new-tab.user.js

I don't know a lot about scripts or programming, so take it easy on me.
Thanks.
 
it's not the fault of the javascript :)

pages are written for Frames or NoFrames and you can tell the difference
by looking at the ANCHOR tag (ie the link)
Code:
<a target="xxx" href="<script ..>foo();</script>">click here</a>
the XXX is the name of the window to display the results from the foo() script

If it is NOT written in this style, right-click for new tab will get exactly what you report, and there's nothing you can do about it.
 
So there's no way to get my desired result?
There has to be some way.
The links look like this.

<td align=middle valign="top"><small><a href="/Web/jsp/search/Authorize.jsp?skus=X654230">Click Here</a></small></td>

The a href doesn't refer to the complete address though, it seems like it "reuses" the current address, but replaces part of it.

(yeah, I know almost nothing about javascript...)

Not sure if that's helpful or not.
 
vnf4ultra said:
<td align=middle valign="top"><small><a href="/Web/jsp/search/Authorize.jsp?skus=X654230">Click Here</a></small></td>
<TD> is a table cell
the HRef is not javascript but rather a JavaServerPage (JSP)
{using FireFox} right click on Click Here should give the choice for New Window or New Tab and
the result from the server JSP should occur on the window choice you made.

Notice; the USER makes the choice for NEW TAB, not the script

All you can do (if you're page has the script) is add
<a target="_new" href=...>
 
If I right click the link, it doesn't have any "open in new tab", or "open in new window." If I right click the link and select properties, it says link will open in: same window.

I guess I can't do what I want.

Thanks for the help though.
 
vnf4ultra said:
If I right click the link, it doesn't have any "open in new tab", or "open in new window." If I right click the link and select properties, it says link will open in: same window.
huh? Current versions of FireFox present
the attached menu... what version do you have anyway?
 

Attachments

  • FF-Right-Click-Menu,jpg.JPG
    FF-Right-Click-Menu,jpg.JPG
    83.8 KB · Views: 5
Here's what I get when I right click the javascript link that I'm trying to middle click. The picture should explain it well.
 

Attachments

  • firefoxlink.JPG
    firefoxlink.JPG
    41 KB · Views: 6
Status
Not open for further replies.
Back