faqts : Computers : Programming : Languages : JavaScript : Forms

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

9 of 15 people (60%) answered Yes
Recently 3 of 8 people (38%) answered Yes

Entry

How to prefill a form located on another server on loading ?

Apr 3rd, 2000 08:33
Martin Honnen, Raf F,


Only trusted script in NN4 can access pages on another server. So if 
your frameset is running locally or it is signed it can for instance do 
the following:


<HTML>
<HEAD>
<SCRIPT>
function setForm () {
  netscape.security.PrivilegeManager.enablePrivilege(
    'UniversalBrowserRead'
  );
  main.document.forms[0].search.value = 'Kibology';
}
</SCRIPT>
</HEAD>
<FRAMESET ONLOAD="setForm();" ROWS="100%, *">
<FRAME NAME="main" SRC="http://www.faqts.com/knowledge-
base/index.phtml/fid/53/">
<FRAME NAME="hidden" SRC="about:blank">
</FRAMESET>
</HTML>

The page loads JavaScript.FAQTs.com and presets the search field to the 
value Kibology.