I would remove you onblur event listener. You really probably ony need the
onchange event listener.
James R. Perkins
On Nov 18, 2009 5:30 AM, "Tom Deskevich" <thomas.l.deskevich@xxxxxxxxxxxxx>
wrote:
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
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To post a
message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or change list
options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/web400.
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at
http://archive.midrange.com/web400.
As an Amazon Associate we earn from qualifying purchases.