User Profile

Collapse

Profile Sidebar

Collapse
ClarkePeters
ClarkePeters
Last Activity: Jan 31 '07, 10:21 AM
Joined: Dec 20 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ClarkePeters
    started a topic xforms select trouble
    in XML

    xforms select trouble

    I don't have any problems with select1 or textarea with my xforms in firefox 1.5.0.9, but I can't seem to get my "select" several choices to work.
    I need to select zero or more of several choices. (more than one choice allowed to be checked)

    here's my instance.xml:

    Code:
    <?xml version="1.0" ?>
    <test>
    <ii id="1">
     <qu id="0">
    ...
    See more | Go to post

  • ClarkePeters
    replied to delete null elements from an array
    in PHP
    Great, got it!
    Thanks for the heads up on that one.
    :)
    See more | Go to post

    Leave a comment:


  • ClarkePeters
    replied to delete null elements from an array
    in PHP
    and....
    I think this also means that if you have an array with null or empty elements you can implode it with a space separator ie:
    Code:
    $mystring= implode(' ', $an_array);
    then use the above code to wipe out any extra spaces,

    then explode it back into an array
    Code:
    $myarray=explode(' ', $mystring)
    and the empty or null elements will be gone, right?
    See more | Go to post

    Leave a comment:


  • ClarkePeters
    replied to delete null elements from an array
    in PHP
    Code:
    $mystring = preg_replace('/\s\s+/', ' ', $mystring);
    fyi to anyone who cares.

    whitespace is represented by: \s

    a single space can be represented by: ' '

    so, a loose translation of the above code would be:
    replace any space (\s) that is followed by multiple spaces (\s+) with a single space (' ') in the string named $mystring, and put the results back into $mystring.

    ...
    See more | Go to post

    Leave a comment:


  • ClarkePeters
    replied to delete null elements from an array
    in PHP
    my typo: s/b perl not pearl
    See more | Go to post

    Leave a comment:


  • ClarkePeters
    replied to delete null elements from an array
    in PHP
    Good heavens! that was so easy.
    It worked like a charm.
    (I'll take another look at pearl regular expressions to see exactly how that works).

    Thank you so much Ronald!

    Thank you.
    See more | Go to post

    Leave a comment:


  • ClarkePeters
    started a topic delete null elements from an array
    in PHP

    delete null elements from an array

    I have large text files that I read into an array, but before that I take out all the special characters such as tabs, new lines, and returns. However I'm left with all the extra spaces (sometimes as many as 20 or more at a time) because my users are allowed to type spaces in their text. For storage and other manipulation, I don't need all those spaces.

    If I explode it I'm left with thousands of empty (null?) elements in the array....
    See more | Go to post

  • ClarkePeters
    replied to xforms and CSS not in sync?
    FYI anyone who's interested, styling in xforms/css, I found this to work for my borders (this is the entire css file):
    Code:
    @namespace html url(http://www.w3.org/1999/xhtm);
    @namespace xf url(http://www.w3.org/2002/xforms);
    
    body 
          {margin-left: 2em;   margin-right: 2em; 
           border-left:solid 10px blue;    
           background-color: gray;   color: white; }
    
    textarea 
          {
    ...
    See more | Go to post

    Leave a comment:


  • ClarkePeters
    replied to data access btw: Merry Christmas!
    in PHP
    Thanks Ronald
    Your reference helped me to clarify my question.

    I won't be using several different files or functions to access a single file to append to.

    Let's say I have several students accessing one form, test.xhtml (with xforms). After answering all the questions they'll submit via post to accept_answers. php. Then accept_answers. php will accept the data; open answers.xml; append the data to answers.xml;...
    See more | Go to post

    Leave a comment:


  • ClarkePeters
    started a topic data access btw: Merry Christmas!
    in PHP

    data access btw: Merry Christmas!

    Merry Christmas!

    I'm looking at doing a web application using xml/xhtml/xforms and php. I think the data files will not be huge so i don't want to use MySQL database, I'll just append the data to the appropriate xml files.

    My question is, suppose I have a form that submits and appends the results to an xml file via php. What if several people are doing the form at the same time and several submit at the same time (think...
    See more | Go to post

  • ClarkePeters
    replied to xforms and CSS not in sync?
    Yes, I am. You must be a mind reader :).

    I want to use Xhtml, xforms, xml, and PHP (without MySQL). All data will be stored in xml files.

    My problem is that I've done some basic programming and relational database building in the long past, and I am just now getting my feet wet in xml, xforms, and PHP. So I should have lots of questions and will probably be heading to the PHP forum soon. :)...
    See more | Go to post

    Leave a comment:


  • ClarkePeters
    replied to xforms and CSS not in sync?
    Yeah, me too. I wasn't sure whether to post here or in XML but I noticed that there are not too many responses in xml forum.
    But since Xforms will soon be the future standard for Xhtml, I thought this would be a good place to post.
    I need to learn Xforms because I don't want to redo my whole web application a couple years down the road, but I'm finding it's a bit tricky. There are no really good books or tutorials, they are either...
    See more | Go to post

    Leave a comment:


  • ClarkePeters
    started a topic xforms and CSS not in sync?

    xforms and CSS not in sync?

    Can anyone tell me why my CSS style sheet isn't styling my xhtml (using xforms)? I'm using firefox 1.5.0.8 with the xforms extension.

    Here is the xhtml, it's only a single text area for input.

    Code:
    <?xml version="1.0" ?>
    
    <html xmlns="http://www.w3.org/1999/xhtml" 
         xmlns:xf="http://www.w3.org/2002/xforms">
        <head>
          <link href="zstyle.css"
    ...
    See more | Go to post
No activity results to display
Show More
Working...