/    Sign up×
Community /Pin to ProfileBookmark

Links text based browser

Could anyone point me to some help on using Javascript specifically for the Links text based browser. We use this browser on our handheld scanners. Need help specifically for trapping function keys, cursor control, and the [Killscript] button in the alert box.

Thanks. Any help at all appreciated.

to post a comment
JavaScript

8 Comments(s)

Copy linkTweet thisAlerts:
@BillyRayAug 11.2004 — AFAIK, Lynx does not support JavaScript.

Dan
Copy linkTweet thisAlerts:
@Naomi_BellauthorAug 11.2004 — It's spelt "Links". The browser has a menu option to enable Javascript options. It's running the Javascript - it's just that some parts are working and some parts aren't. I'm using code built for IE, so I wonder if the browser is interpreting it differently, just as Netscape would.

thanks
Copy linkTweet thisAlerts:
@neil9999Aug 11.2004 — Can you post the code you are using please?

Neil
Copy linkTweet thisAlerts:
@Naomi_BellauthorAug 11.2004 — Hi, Neil. Here's the code:

This code checks an input field. The alert box pops up, but with an extra [Killscript] button that lets the user skip out of the checking function.

if (document.Information.Pcs.value == '') {

alert("Pcs?");

document.Information.Pcs.focus();

document.Information.Pcs.select();

return false;

}

This code places the cursor in the input fields. Works in IE, not in Links.

function placeFocus() {

if (document.forms.length > 0) {

var field = document.forms[0];

for (i = 0; i < field.length; i++) {

if ((field.elements[i].type == "text") ||

(field.elements[i].type == "textarea") ||

(field.elements[i].type.toString().charAt(0) == "s")) {

document.forms[0].elements[i].focus();

break;

}

}

}

}



This code traps a function key. Works fine in IE, ignored by Links.

document.onkeydown = function(){

if(window.event && window.event.keyCode == 116)

{ // Capture and remap F5

window.event.keyCode = 505;

}



if(window.event && window.event.keyCode == 505)

{ // New action for F5

alert('F5 key was pressed');

return false;

}

}



If I turn on an option in the browser, it will give warning msgs about Javascript syntax, but none of it makes any sense. And the code works in IE.



Thanks for your help.
Copy linkTweet thisAlerts:
@neil9999Aug 12.2004 — Does Links even support form fields? Please could you post the code for the whole page, including any (X)HTML, and any warnings/error messages.

[I]Originally posted by Naomi Bell[/I]

[B]If I turn on an option in the browser...[/B][/QUOTE]


What option?

[I]Originally posted by Naomi Bell[/I]

[B]We use this browser on our handheld scanners.[/B][/QUOTE]


Do you mean like those self-service scanners you get in Supermarkets? If so, it might be better to get a custom-made program for it.

Neil
Copy linkTweet thisAlerts:
@BillyRayAug 12.2004 — It's spelt "Links".[/quote]
Aaah - so Links and Lynx (http://lynx.browser.org/) must be two different text-based browsers with similar names.

How confusing for the users!

Dan
Copy linkTweet thisAlerts:
@BillyRayAug 12.2004 — Incidentally, have you visited the Links website to see if they have a tech support forum or knowledgebase, etc?

Dan
Copy linkTweet thisAlerts:
@neil9999Aug 12.2004 — On a google search for "links browser" I found http://artax.karlin.mff.cuni.cz/~mikulas/links/ and http://links.sourceforge.net/ .

Neil
×

Success!

Help @Naomi_Bell spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...