homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Trying to append hidden fields with JS
wnat to take info from JS to a CGI when page is called

WebmasterWorld Senior Member 10+ Year Member

Msg#: 215 posted 8:58 pm on Oct 27, 2002 (gmt 0)

Is it possible for a java script to append hidden fields to a page that it calls? From the script below I would like to be able to have hidden fields with the name of the dealership, email address and other information. When the script is used to pop-up a page I would like it to append that information to fields in the page it is calling so the info can be used by a CGI script that's on the resulting page

Any thoughts?


<table border="0" cellpadding="0" cellspacing="0" width="100%">
<td width="100%">
<SCRIPT language=JavaScript>
function MM_openBrWindow(theURL,winName,features) { //v2.0

<script language="JavaScript">
<!-- Hide from old browsers
// Created by Doug Popeney (easyjav@easyjavascipt.com)
// JavaScript Made Easy! - [easyjavascript.com...]

function surfto(form) {
var myindex=form.select1.selectedIndex
if (form.select1.options[myindex].value != "0") {
<form name="form1">
<p align="center"><select name="select1" onchange="surfto(this.form)" size="1">
<option selected value="0">Select your model and see what we have
&quot;In Stock&quot;
<option value="javascript: MM_openBrWindow('http://wwWebmasterWorldebsite.com/a-inquiry/pilot.html','','top=10,left=40,width=470,height=490,resizable=yes,scrollbars=no')">Honda
<option value="javascript: MM_openBrWindow('http://wwWebmasterWorldebsite.com/a-inquiry/odyssey.html','','top=10,left=40,width=470,height=490,resizable=yes,scrollbars=no')">Honda
<option value="javascript: MM_openBrWindow('http://wwWebmasterWorldebsite.com/a-inquiry/accord.html','','top=10,left=40,width=470,height=490,resizable=yes,scrollbars=no')">Honda
<option value="javascript: MM_openBrWindow('http://wwWebmasterWorldebsite.com/a-inquiry/civic.html','','top=10,left=40,width=470,height=490,resizable=yes,scrollbars=no')">Honda
<option value="javascript: MM_openBrWindow('http://wwWebmasterWorldebsite.com/a-inquiry/civic-hybrid.html','','top=10,left=40,width=470,height=490,resizable=yes,scrollbars=no')">Honda
Civic Hybrid</option>
<option value="javascript: MM_openBrWindow('http://wwWebmasterWorldebsite.com/a-inquiry/insight.html','','top=10,left=40,width=470,height=490,resizable=yes,scrollbars=no')">Honda
<option value="javascript: MM_openBrWindow('http://wwWebmasterWorldebsite.com/a-inquiry/passport.html','','top=10,left=40,width=470,height=490,resizable=yes,scrollbars=no')">Honda
<option value="javascript: MM_openBrWindow('http://wwWebmasterWorldebsite.com/a-inquiry/s2000.html','','top=10,left=40,width=470,height=490,resizable=yes,scrollbars=no')">Honda
S 2000</option>
<option value="javascript: MM_openBrWindow('http://wwWebmasterWorldebsite.com/a-inquiry/crv.html','','top=10,left=40,width=470,height=490,resizable=yes,scrollbars=no')">Honda



WebmasterWorld Senior Member txbakers us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 215 posted 10:01 pm on Oct 27, 2002 (gmt 0)

Yes, it's very easy to append values to hidden fields.

Create the hidden fields, and on the Submit, have the js populate the fields with the values you need.


WebmasterWorld Senior Member 10+ Year Member

Msg#: 215 posted 11:58 pm on Oct 27, 2002 (gmt 0)

Thank you - the problems is, I'm not real sure how to do that. Any help at getting started would be greatly appreciated...


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved