HTML Programming
 
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 DesignHTML Programming

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 November 1st, 1999, 12:06 PM
jmachado
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
I've created a form that accepts certain input and stores it in a
database. (That part is done.)
In one section of the form there are two fields: BRIEF_SUMMARY (text
box) and DETAIL (pull down menu).

What I would like to do is to have the "Brief Summary" text box
automatically filled with the following text "Give Space in MB" ONLY if
"Add Data Space" is selected from the DETAIL pulldown menu.


I have a java script called:

function update_brief_sum(msg,brief_summary) {
var brief_summary = " "
var msg =
document.mktdata.SelProblem.options[document.mktdata.SelProblem.Sel
ectedIndex].text
if (msg == "ADD DATA SPACE") {
document.mktdata.brief_summary.value = brief_summary;
}
}

And in my cgi script I am using the onSelect method to achive this by:

sub brief_summary{

print "<TD align=left bgcolor="#FFA074"><FONT SIZE=2><B>Brief
Summary</B></td>
n";

print "<td bgcolor="#FFA074"><INPUT TYPE="TEXT"
onSelect="update_brief_sum('ADD DATA SPACE','Give Space in MB')"
NAME="brief_summary" SIZE=25 maxlength="75"></td>n ";
}

Something must be missing b/c it's not working.
Any help will be greatly appreciated.

-jen

Reply With Quote
  #2  
Old November 9th, 1999, 06:47 PM
shedder
Guest
Dev Shed Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
try:
function update_brief_sum(msg,brief_summary) {
var brief_summary = " "
var strMsg = "Give space in MB";
var msg = document.mktdata.SelProblem.options[document.mktdata.SelProblem.Sel
ectedIndex].text;
if (msg == "ADD DATA SPACE") {
document.mktdata.brief_summary.value = strMsg;
}
}

Than call update_brief_sum(); [don't think params are invoked that way ...(not sure though)

[This message has been edited by shedder (edited 11-09-99).]

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Automatic population of text box

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