sandip123 Posted November 12, 2009 Share Posted November 12, 2009 ===================[ URGENT ]================= confirm_state is not working properly..as it uses sajax..it is supposed to get the value of the state ..but the state being a string not working...please help.. ........................urgent......... <?php function search_states($str) { //print $str; //print "<br><pre>"; $number=explode('-',$str); //print_r($number); //print $number[0]; if(count($number)==1) { $table='states'; $data=array('*'=>''); $fldarray=array("state"=>$number[0]); $val=dataSelectSearch($table,$data,$fldarray,$extra,$orderArray,$orderType); // print "<pre>"; // print_r($val); for($i=0;$i<count($val);$i++) { $state_name=$state_name."##".$val[$i]['state']; } return $state_name; } else { $strt_val=ord($number[0]); // Ascii of first character $end_val=ord($number[1]); // Ascii of last character //print chr($end_val); for($j=$strt_val;$j<=$end_val;$j++) { $table='states'; $data=array('*'=>''); $fldarray=array("state"=>chr($j)); $val=dataSelectSearch($table,$data,$fldarray,$extra,$orderArray,$orderType); for($m=0;$m<count($val);$m++) { $state_name=$state_name."##".$val[$m]['state']; } } return $state_name; } } ?> <script> function confirm_state1(msg) { // =============================== [subcategory follows ] ========================= //alert(msg); var value=msg; var arr=Array(); arr=value.split("##"); for(i=1;i<=(arr.length-1);i++) { //var new_val; //alert(i); //var int=Integer.valueOf(arr); document.getElementById('innercontent').innerHTML=document.getElementById('innercontent').innerHTML+"<br> <a href='javascript:void(0);' onclick='document.getElementById(state_name).value="+arr+";' class='small_link1'>"+arr+"</a>"; //document.getElementById('all_state').innerHTML=''; //alert(document.getElementById('innercontent').innerHTML); } } function showname(val) { //alert(msg1); alert(val); document.getElementById('state_name').value=val; document.getElementById('all_state').style.display='none'; } function findstate(str) { //alert(str); document.getElementById('innercontent').innerHTML=''; document.getElementById('all_state').style.display='inline'; var str1=str; x_search_states(str1,confirm_state1); } </script> Quote Link to comment https://forums.phpfreaks.com/topic/181248-urgent-javascript-help/ Share on other sites More sharing options...
MadTechie Posted November 12, 2009 Share Posted November 12, 2009 1. don't label as urgent, unless its in the freelance section 2. use code tags 3. "not working" and "not working properly" isn't much help.. 2. Users will not mark their post as being "URGENT" by either making the post ALL CAPS or adding any hint that they need it done Quick or ASAP. All posts are treated equal, your post is no more important than any other user's post on this forum. If it is "URGENT" pay someone to do it. 4. Users will format posts as best as they can by using proper or [php ][/php ] tags and following Proper Code Indentation guidelines. 13. Duplication of topics is strictly prohibited. Users will not post duplicate topics, if a topic needs moved please use the "Report to Moderator" button and a staff member will move the topic as soon as possible. Quote Link to comment https://forums.phpfreaks.com/topic/181248-urgent-javascript-help/#findComment-956161 Share on other sites More sharing options...
.josh Posted November 12, 2009 Share Posted November 12, 2009 actually that rule about urgency is dated. We actually promote the opposite. If your post is urgent, we'll get right on it. Yep, we sure will. In fact, the more times you mention it's urgent, the more we will escalate it. Mark it as high priority in the queue, etc... but I'm just not feelin' it. Sure, he put it in the subject, but it's not in caps, and he could have put it 2 or 3 times in the subject. With stars or something. And in his post, I only see 'urgent' twice. To me, that doesn't seem all that urgent. Sorry OP, I'm just not buying it. If it was really urgent I woulda seen it after every line break. Quote Link to comment https://forums.phpfreaks.com/topic/181248-urgent-javascript-help/#findComment-956181 Share on other sites More sharing options...
haku Posted November 13, 2009 Share Posted November 13, 2009 Did you say urgent? I'm on it. Right now. Working hard at it as I type. Oh wait, I'm typing, so I can't be working hard on it. Ok, I'm going to stop typing, then get working hard on it. Since it's urgent and all. Quote Link to comment https://forums.phpfreaks.com/topic/181248-urgent-javascript-help/#findComment-956632 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.