JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 1st, 2000, 03:58 PM
bbarker bbarker is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2000
Posts: 25 bbarker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I'm trying to pass several variables through a form. The basic function of the form is for a user fill out contact info and to select a document format for the request - upon selection, the rest of the form is automatically loaded . The problem is, if I fill in the field before selecting a format, the re-load deletes everything. I've tried hidden files with no luck and several other things as well. Any help getting the field values to hold while the rest of the form loads would be greatly appreciated. I've included a sample of the code - the original is much larger.

Thanks again.

<?
if($OutputTypeID=="1") {
$include="./drawing.inc";
}
elseif ($OutputTypeID=="2"){
$include="./map.inc";
}
else {$include="./logo.inc";}
?>

<html>
<head>
<title>Untitled</title>

<script language="Javascript" TYPE="text/javascript">
function Gothere()
{
var ii=document.Index.OutputTypeID.selectedIndex;
var qid=document.Index.OutputTypeID.options[ii].value;
top.location.href=qid;
return true;
}
</script>

</head>

<body onLoad="this.document.Index.Requestor.focus()">
<form method="get" action="test1.phtml" name="Index">

<table border="0">
<tr>
<td><input type="text" name="Requestor" size="51" value="<?echo "$Requestor"?>">
<p>
<select name="OutputTypeID" onChange="Gothere()" size="1">
<option value="none">Select type
<option value="none">-------------------------------&nbsp;
<option value="./test1.phtml?OutputTypeID=1" <?if($OutputTypeID=='1'):?>selected<?endif?>>Drawing</option>
<option value="./test1.phtml?OutputTypeID=2" <?if($OutputTypeID=='2'):?>selected<?endif?>>Map</option>
</select>
</td>
</tr>
</table>
</form>
</body>
</html>

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignJavaScript Development > Need help passing variables through a Javascript function.

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap