Jump to content

lightnb

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

lightnb's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I put this at the bottom of the form page, after the footer: [code] <? if($transducertype != empty()) { //valid } else { exit("Not valid"); } if($polarpattern != empty()) { //valid } else { exit("Not valid"); } if($minfr == ereg()) { //valid } else { exit("Not valid"); } ?> [/code] I'm not sure how to make it execute when the button is pushed, how to post the data to itself?, and whether or not my syntax is correct. Thanks, Nick
  2. Thanks. How do you tell it to execute the code, when the submit button is pushed?
  3. -And also, how do i make it somewhat inteligent? some fields, such as max SPL should be a number and contain no letters, some should be letters only, some should be both. It should also assign a number to the entry, that the user does not see. the number should be the next unused number, and is used to identify the item even if the name changes. thanks, Nick
  4. Where would that go? as part of the submit button? or on the next page? the form is on a .php page.
  5. Ok, I have my HTML table done. When the user clicks "submit" it needs to check all fields to make sure they are there, and then print the results on a confirmation page, where the user can verify the information and then actually submit it. First, how do I check to make sure the fields are completed, and second, how do I make the confirmation page work? Thanks, Nick
  6. I am currently working on building the form in Java/HTML. I noticed that if the HTML thats in the ' ' marks isn't all one long line, then it ceases to function. This makes coding extremely difficult, since its all one big clump of code. Is there any way to make it work using multiple lines? for examle, this is what I'm doing that works: [code] if (geartype == 0) {     document.getElementById('addfield').innerHTML = 'Make: <input class="pink" type="text" size="3" name="make"><br>Model: <input type="text"  size="3" name="model"><br>Type: <select name="mictype size="5" id="mictype"><option>Hand Held Vocal</option><option>Instrument</option><option>Body Mic (clip on, over ear, etc.)</option><option>PCM/PZM/Border Mic</option><option>Shotgun</option><option>Other Type/Specialty</option></select><br>Transducer Type: <select name="transducertype" id="transducertype"><option>Dynamic</option><option>Condeser</option><option>Piezo-Electric</option><option>Carbon</option><option>Other or Specialty</option></select><BR>Polar Pattern: <select name="polarpattern" id="polarpattern"><option>Omni-directional</option><option>Bi-Directional</option><option>Cardiod</option><option>Super Cardiod</option><option>Hyper Cardiod</option><option>User Selectable</option><option>Other/Specialty</option></select><br>Frequency Response: <input type="text" name="minfr"> Min. <input type="text" size="3" name="maxfr"> Max <br>Max SPL: <input type="text" size="3" name="Max SPL">Db<br><input class="red" type="Submit" Value="submit">';[code][quote] [/code] and this is what I'd like to do: [code] if (geartype == 0) {     document.getElementById('addfield').innerHTML = 'Make: <input class="pink" type="text" size="3" name="make"><br> Model: <input type="text"  size="3" name="model"><br> Type: <select name="mictype size="5" id="mictype"> <option>Hand Held Vocal</option> <option>Instrument</option> <option>Body Mic (clip on, over ear, etc.)</option> <option>PCM/PZM/Border Mic</option> <option>Shotgun</option> <option>Other Type/Specialty</option></select><br> Transducer Type: <select name="transducertype" id="transducertype"> <option>Dynamic</option> <option>Condeser</option> <option>Piezo-Electric</option> <option>Carbon</option> <option>Other or Specialty</option></select><BR> Polar Pattern: <select name="polarpattern" id="polarpattern"> <option>Omni-directional</option> <option>Bi-Directional</option> <option>Cardiod</option> <option>Super Cardiod</option> <option>Hyper Cardiod</option> <option>User Selectable</option> <option>Other/Specialty</option></select><br> Frequency Response: <input type="text" name="minfr"> Min input type="text" size="3" name="maxfr"> Max <br> Max SPL: <input type="text" size="3" name="Max SPL">Db<br> <input class="red" type="Submit" Value="submit">';[/code] But the second option doesn't work. aparently having carage returns makes it cease to function. are there any tricks to get around this? Thanks, Nick
  7. Ok, i get how that works. what if i want to add more than one action as the result of a choice? ie. if the user chooses "US" it asks for state, city and zip code, in three seperate fields? changing the code to read: [code] <script type="text/javascript"> function showinput(country) {   if (country == 1) {     document.getElementById('addfield').innerHTML = 'State: <input type="text" name="state">';   } else if (country == 2) {     document.getElementById('addfield').innerHTML = 'Province: <input type="text" name="prov">';     document.getElementById('addfield').innerHTML = 'State: <input type="text" name="state">';        } } </script> <form> <select name="country" id="country" onchange="javascript: showinput(document.getElementById('country').selectedIndex)"> <option></option> <option>US</option> <option>Canada</option> </select> <div id="addfield"></div> </form>[/code] In hopes that it would be that simple, but it seems that the syntax is different for the second line?
  8. Ok, so I guess the first step would be for me to create an input form, and get it to post correctly to SQL. I've seen some sites before where options can be added dynamically, for example when you choose "united States" it adds a field for "state". What language should i script in? Do I build the form in HTML? or do I have to use something else? Thanks, nick
  9. I want to add a database application to my site, but don't know where to start. Here's what i want it to do: I want people to be able to submit via a form interface, information about a particular item. For example: Name: my item Make: My Manufacturer Model: My Model Color: blue Length: 5" Height: 7' Width: 2 miles And so on. The fields would be specific based on the type of item submitted, ie.. The form would have a pull down box to select the type of item. For example if the type is "microphone", Then the form changes to reflect the type of properties a microphone has: Manufacturer: Shure Model: SM58 Pickup pattern: cardiod The items in the "type" pull down box would be pre-created, as with their associated fields. Once the form is submitted, the system needs to check: (1) If all required fields are complete (2) If the item specified is already in the database Next, it should post the new item to SQL for storage. To retrieve items, the user can search for all "microphones" whose manufacturer= "shure", (using a form) and it will return all entries who match the search criteria on a results page. if the user clicks on the title link on the results page, a new page should be dynamically generated that looks very much like a "myspace" profile for the item. it lists, in a predefined layout, all of the states and statistics of the item, as well as includes a picture and links to additional pictures. Is there an application that does this? How hard would this be for me to write? Thanks, Nick
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.