Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1648 Is there a way to invoke a server side process without affecting the current page being displayed when the user interacts with a form?

You are here: irt.org | FAQ | JavaScript | Form | Q1648 [ previous next ]

1. You can change the src attribute of an image to the return reponse of the server side process in Netscape Navigator 3+ and Internet Explorer 4+:

<img src="blank.gif" width=1 height=1 name="serverImage">

<a href="javascript:;" onClick="if (document.images) document.images['serverImage'].src='server-side-process'; return false">Call server side process</a>

or:

<form>
<input type="text" onChange="if (document.images) document.images['serverImage'].src='server-side-process?'+this.value;">
</form>

2. You can change the location of a hidden frame in Intenet Explorer 3+ and Netscape Navigator 2+:

<form>
<input type="text" onChange="top.hiddenframe.location.href='server-side-process?'+this.value;">
</form>

3. You can change the contents of an inline frame or layer in Internet Explorer 4+ or Netscape Navigator 4:

<iframe name="myServerStuff" width="1" height="1">
<layer name="myServerStuff" width="1" height="1"></layer>
</iframe>

<script language="JavaScript"><!--
function change(value) {
    if (document.all)
        document.myServerStuff.location.href='server-side-process?'+this.value;
    else if (document.layers)
        document.layers['myServer'].src='server-side-process?'+this.value;
}
//--></script>

<form>
<input TYPE="text" onChange="change(this.value)">
</form>

©2018 Martin Webb