kailuaboy
January 31st, 2009, 12:55 PM
I am trying to add a radio, checkbox, and combobox to my script.
Please tell me what I am doing wrong here?
//station_ids = textBox1 (station field, input)
//std_trans = radioButton1/2 (radio button for Raw data, or Translated)
//hoursSTtr = comboBox1 (How many hours worth of data? dropdown tab)
//chk_metars = checkBox1 (Metars?)
//chk_tafs = checkBox2 (TAFs?)
------Start class-----
public void Process(String station_ids, bool std_trans , String hoursStr, String chk_metars, String chk_tafs)
FormUtility form = new FormUtility(ostream, null);
//Station Ids (ie KDEN = Denver)
form.Add("station_ids", station_ids);
//Output Raw or Translated
form.Add("std_trans", );
//How many hours ago worth of data
form.Add("hoursStr", "");
//METAR's
form.Add("chk_metars", "METARs");
//TAF's
form.Add("chk_tafs", "TAFs");
//Submit
form.Add("submitmet", "Submit");
form.Complete();
ostream.Close();
//Button submit form and retrieve information
//Textbox is String, radioButton1 is ?, comboBox1 is ?, checkBox1 is ?, and
//checkbox2 is ?
private void button2_Click(object sender, EventArgs e)
{
AviationWeather parse = new AviationWeather();
parse.Process(textBox1, radioButton1, comboBox1, checkBox1, checkBox2);
}
------------END Class----------
-------Here is the form.Add class---------
public void Add(String name, String value)
{
if (this.boundary != null)
{
Boundary();
WriteName(name);
Newline();
Newline();
Writeln(value);
}
else
{
if (!this.first)
{
Write("&");
}
Write(Encode(name));
Write("=");
Write(Encode(value));
}
this.first = false;
}
----------
<b>So, what I am looking for is, what do I use instead of "String" for the radiobox, combobox and checkBox? I think for the radiobox I should use bool. </b>
Am I headed in the right direction?
http://adds.aviationweather.gov/metars/ is the website I am trying to POST the form to.
Thank you,
Ivan
Please tell me what I am doing wrong here?
//station_ids = textBox1 (station field, input)
//std_trans = radioButton1/2 (radio button for Raw data, or Translated)
//hoursSTtr = comboBox1 (How many hours worth of data? dropdown tab)
//chk_metars = checkBox1 (Metars?)
//chk_tafs = checkBox2 (TAFs?)
------Start class-----
public void Process(String station_ids, bool std_trans , String hoursStr, String chk_metars, String chk_tafs)
FormUtility form = new FormUtility(ostream, null);
//Station Ids (ie KDEN = Denver)
form.Add("station_ids", station_ids);
//Output Raw or Translated
form.Add("std_trans", );
//How many hours ago worth of data
form.Add("hoursStr", "");
//METAR's
form.Add("chk_metars", "METARs");
//TAF's
form.Add("chk_tafs", "TAFs");
//Submit
form.Add("submitmet", "Submit");
form.Complete();
ostream.Close();
//Button submit form and retrieve information
//Textbox is String, radioButton1 is ?, comboBox1 is ?, checkBox1 is ?, and
//checkbox2 is ?
private void button2_Click(object sender, EventArgs e)
{
AviationWeather parse = new AviationWeather();
parse.Process(textBox1, radioButton1, comboBox1, checkBox1, checkBox2);
}
------------END Class----------
-------Here is the form.Add class---------
public void Add(String name, String value)
{
if (this.boundary != null)
{
Boundary();
WriteName(name);
Newline();
Newline();
Writeln(value);
}
else
{
if (!this.first)
{
Write("&");
}
Write(Encode(name));
Write("=");
Write(Encode(value));
}
this.first = false;
}
----------
<b>So, what I am looking for is, what do I use instead of "String" for the radiobox, combobox and checkBox? I think for the radiobox I should use bool. </b>
Am I headed in the right direction?
http://adds.aviationweather.gov/metars/ is the website I am trying to POST the form to.
Thank you,
Ivan