When I want to cancel the page, and go back to the previous page in history,
it executes the JavaScript and makes me press the cancel button again.
Is there a way to keep JavaScript from executing? I want to default a value
in a combo box and when they select or leave that box, I want to skip to the
appropriate text box, depending on the selection.

But when I cancel, it is executing the JavaScript, and forces me to press
the cancel button twice.
===================================================
JavaScript: Jump to text box based on selection of atcombo, this executes
when I press the cancel button

function atjump()
{ var
accounttype=(siform.atcombo.options[siform.atcombo.selectedIndex].value)
if (accounttype == 1)
var mytext=document.getElementById("orgname")
if (accounttype == 2)
var mytext=document.getElementById("indlastname")
mytext.focus() }
===================================================
Combo box: Defaults a 1.

<select size="1" name="atcombo" style="background-color:white" tabindex="1"
onSelect=atjump() onblur=atjump() onChange=atjump()>
<option selected value="1">Orginization</option>
<option value="2">Individual</option>
</select>
=====================================================
Cancel Button:

<form>
<div style=text-align="center">
<input type="button" value="CANCEL REGISTRATION AND RETURN"
onclick="history.go(-1)"/> </div

Thanks!

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx] On
Behalf Of Tom Deskevich
Sent: Monday, November 16, 2009 10:29 AM
To: 'Web Enabling the AS400 / iSeries'
Subject: Re: [WEB400] Easiest question ever posted?


Thanks Michael, it does do the action, but only after positioning me to the
top of the page. It is possible it is running some JavaScript before the
onclick?

Tom Deskevich





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.