justravis
-
Posts
115 -
Joined
-
Last visited
Posts posted by justravis
-
-
tom,
i'm using ie6 & ff2.0.0.6
thanks!!
-
Please try submitting both these forms without entering any data:
u: phpfreaks p: phpfreaks
http://raise-the-bar.cc/programs/dmd/mentee/intro.pwr
The error messages contain anchor tags to put focus on the feilds. The first script works in IE & Firefox. The second script only works in IE.
Thots?
Thank you.
-
i thot it was the equivalent of return false; but i could not find any documentation stating the fact...tho i hav recently found instances where they behave differently...u r right...return false; is best.
-
yes, u r right!! I did forget the id attribute!
- 1000 cool points for travis
i think that oversight cost me almost a day!!!!
-
made a few corrections:
<script src='intro.js'></script> <form method=post action=/programs/dmd/mentee/intro.pwr onSubmit='return validForm()'> <input name=required id=required type=hidden value='chan,subchan'> <label>How did you hear about Disability Mentoring Day?<br /> <select name='chan' onChange='showSubchan(this.value)'> <option value=''> Please choose. </option> <option value=2> San Diego Community College District </option> <option value=3> San Diego Unified School District </option> </select> <br /> <div id='selectSubchan'></div></label> <input name=next id=next type=submit value=Next> </form>
function validForm() { var elem=document.getElementById('chan'); if(!elem.value) { alert('chan'); elem.focus(); return false; } else { return true; } }
-
i'm just trying to check 1 select menu at this point...it doesnt even trigger
<script src='intro.js'></script> <form method=post action=/programs/dmd/mentee/intro.pwr onSubmit='return validForm()'> <input name=required id=required type=hidden value='chan,subchan'> <label>How did you hear about Disability Mentoring Day?<br /> <select name='chan' onChange='showSubchan(this.value)'> <option value=''> Please choose. </option> <option value=2> San Diego Community College District </option> <option value=3> San Diego Unified School District </option> </select> <br /> <div id='selectSubchan'></div></label> <input name=next id=next type=submit value=Next> </form>
javascript
function validForm(form) { elem=document.getElementByID('chan'); if(elem.value == "Please Choose") { alert(helperMsg); elem.focus(); return false; } else { return true; } }
Any thoughts?
THANK YOU!
-
How does 'return;' differ from 'return false;' or return true;'?
THANKS!!!
-
Is there a way in phpmyadmin or is there some kind of plugin that will display a relationship diagram of my db?
Thanks.
-
great tips...i'll implement once i figure out why the checkboxes wont validate.
-
First, i did not need to pass the form name to any of my other validation functions, but is it necessary when dealing with checkbox arrays?
Second, I tried 2 different approaches to figuring out if any checkboxes in the array are checked, but none of them work.
function check_req(form, field, alerttext) { /*count_checked=0; for(i=1; i<field.length;i++) { if(field.checked==true) { count_checked++; } } if(count_checked==0)*/ if(form.field.checked==false) { alert(alerttext); return false; } }
http://www.powerontechnologies.com/_sites/vsd/savy/savy.pwr
Any ideas?
THANKS!
-
HUGE HELP! THX!!!
-
cant figure y this wont validate for required feilds:
http://www.powerontechnologies.com/_sites/vsd/savy/savy.pwr
any ideas?
-
I think CURL could be used as well.
-
OK...i altered your suggestion a bit, but I wanted to ask if there were advantages to using strcasecmp() (or any other differences in yr code) that i'm not aware of?
foreach($_POST as $key => $postvar) { #Var name start with 'job'? if(substr($key,0,2)=='job') { #Var name end with 'quest'? if(substr($key,-5)=='quest) { #Cycle thru checkbox array. foreach($postvar as $quest) { echo "$quest<br />"; } } } }
THANKS AGAIN! You really got my mind going! I WAS STUCK!!!
-
yes, i believe that is the approach i was looking for...i will try it tomorrow..thx
-
i am dynamically creating a list of checkboxes for each job title in a db.
the checkbox array names are something like 'job2quest[]' & the 'job5quest[]'...
since i dont necessarily kno which jobs will appear, i dont want to hardcode the variables when the form is submitted.
is there a way to pick apart post variable names, so the script can find the checkbox arrays?
And/or is there a way to loop thru them? (like if they could be named job[]quest[])
thank you!!!
-
thank u so much..u were right..forgot to update the lpath to that img on the css pg
i replaced all the ", so i did not hav to escape out of all of them using \...i thot they were interchangeable?
-
i updated the image src's & link href's & the left side graphics disapeared
old: http://fitnessclinic.powerontechnologies.com/
new: http://ridgeline.websitewelcome.com/~sdsufc/index.pwr
any ideas?
thank u for yr time.
-
THATS AWESOME!!! It worked!
I couldn't even find multi-dimensional $_POST or superglobal arrays mentioned in the manual.
-
If i named checkboxes "check[]", is there a way to quickly get the value of check[1]?
I tried $_POST[check[1]] & it didnt work.
THANK YOU!
-
I am creating a music database. Each album will have a category and MAY have a sub-category.
I'm thinking of making ONE category table with feilds:
id, name, parent_id
If it's a sub-category, the parent_id will be the id of the category in the same table.
Does this sound right or is there a better way?
THANK YOU!
-
whenever i upload pages, they automatically reference some index page i do not have access to...the url is something like:
http://www.vsd.org/AboutUs/index.php/signup2_-_projects.php
i cant imagine wut code in that index file could trigger such an error in my page...
i cleaned up my code as suggested, but i am getting the same error.
thanks again.
-
here's the code in it's entirety...should have done it before, but i was trying to simplify things for u guys.
now the error is on line 141.
thanks for responding so quickly.
[attachment deleted by admin]
-
i have been knockin my head against the wall...it LOOKS good to me...i get the error @ 2613...then if i remove that line..the same error applies until i remove all after 2612...any thots?
$project=array(
7 => "Serving Meals",
2612 => "Dining Room Attendant: 9/22, breakfast",
2613 => "Dining Room Attendant: 9/23, breakfast",
2614 => "Dining Room Attendant: 9/24, lunch",
2615 => "Dining Room Attendant: 9/25, dinner",
2616 => "Dining Room Attendant: 9/26, lunch",
2617 => "Dining Room Attendant: 9/27, breakfast",
2618 => "Dining Room Attendant: 9/27, dinner",
2619 => "Dining Room Attendant: 9/28, dinner",
2620 => "Dining Room Attendant: 9/29, lunch",
2611 => "Dining Room Attendant: 9/30, dinner"
);
Firefox Anchor Tags Place Focus On Form Feilds?
in HTML Help
Posted
Thank you. I removed the query spitting out because it was only a test.