Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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?

irt.org | Knowledge Base | JavaScript | Form | Q1648 [ previous next ]

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?

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>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.