Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Dependant Fields
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Dependant Fields

 Post Reply Post Reply
Author
yad00g View Drop Down
Newbie
Newbie


Joined: 29 May 2005
Location: Australia
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote yad00g Quote  Post ReplyReply Direct Link To This Post Topic: Dependant Fields
    Posted: 29 May 2005 at 10:55pm
Is it possible to dynamically fill in form fields dependant on what is selected in a dynmaic drop down list without submitting, ie: "on the fly".
 
Thanks.
Back to Top
ub3rl337ch3ch View Drop Down
Senior Member
Senior Member
Avatar

Joined: 16 February 2005
Location: Australia
Status: Offline
Points: 341
Post Options Post Options   Thanks (0) Thanks(0)   Quote ub3rl337ch3ch Quote  Post ReplyReply Direct Link To This Post Posted: 29 May 2005 at 11:05pm
if you want to fill it in the fields from a database then the best you can do is do a js onchange (on the dropdown) to post the form to a new window which contains the asp to interface with the db. using opener.focus at the very head of the page (in js tags) means that it shouldn't be too annoying for users. then create a bunch of hidden fields in the second page like so:
<form name="theform">
<input type="hidden" name="thefield" value=<%=vrec("thefield")%>> 
<input type="hidden" name="thefield2" value=<%=vrec("thefield2")%>> 
</form>
Then run some js like this:
<script language="javascript">
opener.document.form.field1.value = document.theform.thefield1.value
opener.document.form.field2.value = document.theform.thefield2.value
</script>
 
Downside of this is it doesnt work if people have blocked popups, or if they've disabled js, and it is a bit messy.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.