Jump to content

Stickybomb

Members
  • Posts

    133
  • Joined

  • Last visited

    Never

Posts posted by Stickybomb

  1. no do not use lightbox this is easy to accomplish with css just set your margin to auto in all cases using css example

     

    <div style="margin:auto auto;"></div>

     

    this should accomplish what you are looking for.

     

    Also kind of off subject but lightbox is a horibble way to accomplish what it does, since it uses prototypes that contain way to much code then you need. ;)

     

    Anyways hope this helped

  2. Hi,

     

    I am completely new to ajax, however I have a task that I believe I would need it for. I have a drop down menu of product lines.

    When a product is selected i need to display some form fields required for that product on the page to be filled in without having to refresh the page. The form is written in php. Any help with how to go about this or what to do would be greatly appriciated.

     

    thks,

     

    -Mike-

  3. ok not sure why this is but when i use the folowing code inline it works fine but when i place it in a function and call the function it only changes the visibility and not the x,y coords. Anyone help me with this?

     

    document.getElementById(id).style.visibility = 'visible';
    document.getElementById(id).style.top = (event.clientY - 41);
    document.getElementById(id).style.left = (event.clientX - 20);
    

  4. i did what you said in the other post, but it gave me an error. it did not like the whole\z thing and then no matter what i did it gave me a end delimiter error. so i revamped the regex and tried it with eregi again, the other values worked fine though. So basically using preg this regex does not work either. I am sorry if i am a little troublesome i am completely new to the use of regex. in the other post you said not to use shorthand? what exactyl is shorthand, of this I was unsure.

     

     

  5.  

     

    i made this regex value

     

    ^[0-9]{1,5}\s[[a-zA-Z0-9]*[\sa-zA-Z0-9]*[aAvVeEsSrRdDtT]{2,3}\.?\s[nNsSeEwW][\.\s]?[nNsSeEwW][\.]?$

    (1111 somewhere st se| 1111 somewhere st. s.e. | 1111 east st st. n.w.)  <-- all work in tester

     

    to check an address in php running it through eregi and for some reason the regex accepts the data i am inuting in the regexlib.net teseter but it does not in my script any help with this would be great

     

     

     

    thks

     

    stickybomb

     

  6. just search around for tutorials, why does it have to be one large start-to-finish tutorial.

     

    im not really looking for a specific start to finish thats the range anything is helpful and i have been looking on my own i asked if anyone new of any good ones! just because a tutorial exsists does not make it good!

     

    thks superuser

  7. well if you do not need it instantly refreshed than ajax and javascript is a waste of time. You could do it like this in php in your processing script you could do this easily. just check the value of the variable to see if you want to go to the form. set up a varible like URL that contains the address of the page you are to go to once you are doen processing. then if you need to go to sub form then change the URL to the sub form else leave it as default value. as for the data you could dump it in global variables that way you could request them on the sub page if needed.

     

    example:

    
    //default url value if no sub form
    $URL = "/thank-you.php";
    
    //makes you info global to call on sub form if needed
    global $value1 = $_POST['value1'];
    
    //not sure if you needed this to be global or not but its easier to work with then a $_POST variable
    global $menu = $_POST['menu'];
    
    //simple check example can do whatever you wnat it to
    if($menu = 'sub'){
    $URL = "/subform.php";
    }
    

     

    i hope this helps if not try providing some sort of example from you form and process scripts

  8. well im not sure if i am understanding what you are asking but if the database does not exsist you will get an error telling you that it does not exsist when you run the script. Also these are all sql problems and not php issues. php parses the sql and stores the results into varablies. It sounds like you are looking for the sql statements to accomplish said tasks.

     

    also are you using or have you heard of phpmyadmin?

    if not you might want to look into it it can handle all of you databases alot faster and more efficient than writing a php script to do it.

    also it is a great way to learn the mysql statements you need to know since when you do something it shows you the sql statment it used to accomplish it.

     

    if this is not what you ment then try providing some more info like examples of what you are trying to do. ;)

  9. that looks good it will sure help me with classes and objects. But thats all the further it goes im looking for some really indepth from beginner to expert stuff if anyone knows of an tutorials,books, etc...

  10. hi i looking for any good tutorials and or information on oop programing. I see alot of ppl using however i have no understanding of it and am looking to tr and wrap my head arround it.

     

    Any links to tutorials, information, or books would help me alot thks

  11. ok i got all my regs, however for some reason some of them test fine with the tester on the RegExLib site, but are not working for my project, i am using the same data

     

    here is the code im using

     

    these are the reg values

     

    $emailreg = "^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.([a-zA-Z]{2,4})$";
    $namereg = "^[A-Za-zÀ-ÖØ-öø-ÿ '\-\.]{1,22}$";
    $address1reg = "^\d{1,5}\s[\w0-9][\sa-zA-Z0-9]*[aAvVeEsSrRdDtT]{2,3}\.?\s[nNsSeEwW][\.\s]?[nNsSeEwW][\.]?$";
    $address2reg = "^p(ost)?[ |\.]*o(ffice)?[ |\.]*(box)?[ 0-9]*[^[a-z ]]*";
    $zipreg = "(^\d{5}$)|(^\d{5}-\d{4}$)";
    $phonereg = "^(\(?\d\d\d\)?)?( |-|\.)?\d\d\d( |-|\.)?\d{4,4}(( |-|\.)?[ext\.]+ ?\d+)?$";
    $statereg ="^((AL)|(AK)|(AS)|(AZ)|(AR)|(CA)|(CO)|(CT)|(DE)|(DC)|(FM)|(FL)|(GA)|(GU)|(HI)|(ID)|(IL)|(IN)|(IA)|(KS)|(KY)|(LA)|(ME)|(MH)|(MD)|(MA)|(MI)|(MN)|(MS)|(MO)|(MT)|(NE)|(NV)|(NH)|(NJ)|(NM)|(NY)|(NC)|(ND)|(MP)|(OH)|(OK)|(OR)|(PW)|(PA)|(PR)|(RI)|(SC)|(SD)|(TN)|(TX)|(UT)|(VT)|(VI)|(VA)|(WA)|(WV)|(WI)|(WY))$";
    

     

     

     

    this is the code to test them

     

     //chnage case
    $state = strtoupper($state);
    
    //check size
    if(strlen($_POST['chimney_pot_size']) > 2){$sizeflag=1; $size='';}
    //check email
    if(!eregi($emailreg, $email)) {
      $emailflag=1;
      $email='x';
    }else{$email=$_POST['email'];}
    //check name
    if(!eregi($namereg, $name)) {
      $nameflag=1;
      $name='x';
    }
    //check address1
    if(!eregi($address1reg, $address1)) {
      $address1='x';
    }
    //check address2
    if(!eregi($address2reg, $address2)) {
      $address2='x';
    }
    //check city
    if(!eregi($namereg, $city)) {
      $city='x';
    }
    //check state
    if(!eregi($statereg, $state)) {
      $state='x';
    }
    //check zip
    if(!eregi($zipreg, $zip)) {
      $zip='x';
    }
    //check phone
    if(!eregi($phonereg, $phone)) {
      $phone='x';
    }
    

     

    i have it set to show an x if its not working

     

     

    This is my test data

     

    name=bob marley

    address1=1234 newport rd. n.w.

    address2=po box 1234

    city=springfield

    state=ca

    zip=12345

    telephone=(123)-456-7890

     

     

    the results i am getting

     

    name =bob marley

    address1=x

    address2=po box 1234

    city=springfield

    state=CA

    zip=x

    telephone=x

     

     

     

    if anyone can help me with this or knows what it is im doing wrong it would help me out alot.

     

    thks

     

    stickybomb

  12. sorry that did not help me im almost certain it will require ajak t dynamicly update it without having to preload the images

     

    keep in mind the file size for each img is 4kb each and there are like 100 of them or so.

  13. here is the dilema

     

    i have a file that i am bring in text from, but i want to only bring in one line of text. How do I detect, or tell it to only work with one line.

     

    Exp.

     

    my file looks like this

    1|0|1
    2|1|0|0
    3|0
    4|0
    5|1|1
    6|0
    7|0|1|1|0
    8|1
    9|1|0
    

     

    i want to bring in the series after the number to work with, stoping at the end of the line.

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