Jump to content

urgent javascript help


sandip123

Recommended Posts

===================[ 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>

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.