Jump to content

paolinaaaaaaa

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

paolinaaaaaaa's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. thanks...I tried it but it still doesn't work. Any more suggestions?  :)
  2. Hi everyone I adapted this little script to make a dynamic sum of values inserted in a list box. However I can only get it to work in firefox but not in explorer. Can anyone tell me why? thanx! [hr] //in the head of my document: <script type ="text/javascript"> <!-- Begin function startCalc(){   interval = setInterval("calc()",1); } function calc(){   one = document.form.comm.value;   two = document.form.cost.value;   three = document.form.hres.value;   four = document.form.qual.value;   five = document.form.scop.value;   six = document.form.time.value;   document.form.total.value = (one * one) + (two * two) + (three * three) + (four * four) + (five * five) + (six * six);     } function stopCalc(){   clearInterval(interval); } //  End --> </script> //in the body <select name='comm' size ='1' onFocus="startCalc();" onBlur="stopCalc();"> <option selected='selected'>0</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> <select name='cost' size ='1' onFocus="startCalc();" onBlur="stopCalc();"> <option selected='selected'>0</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> <select name='hres' size ='1' onFocus="startCalc();" onBlur="stopCalc();"> <option selected='selected'>0</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> <select name='qual' size ='1' onFocus="startCalc();" onBlur="stopCalc();"> <option selected='selected'>0</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> <select name='scop' size ='1' onFocus="startCalc();" onBlur="stopCalc();"> <option selected='selected'>0</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select> <select name='time' size ='1' onFocus="startCalc();" onBlur="stopCalc();"> <option selected='selected'>0</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> </select>
  3. Probably a really stupid question but I am a total beginner ???...so here is the scenario: I have a html form in which people can insert a series of values. On pressing submit these values should be used to insert a tuple in a mysql database using php. However the values could already be in the database. I therefore need to check that beforehand. In short I need to do: IF (tuple already in db) return tuple primary key ELSE insert tuple in db return tuple primary key how could I do this? I have tried doing a select and seeing if it returns false but either I get a value (if the tuple is in the db) or I get an error (if the tuple is not in the db) and my script doesn't reach the end. Thank you very much, Paolina
×
×
  • 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.