User Profile

Collapse

Profile Sidebar

Collapse
gsherp
gsherp
Last Activity: Oct 18 '09, 11:12 PM
Joined: May 18 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • gsherp
    started a topic .htaccess Question

    .htaccess Question

    I was wondering if there was anyway in the .htaccess file to access bash scripts.

    I want to do this because for the mod_rewrite configuration:

    RewriteBase /home/ { whoami } /www/

    is there any equivalent way of doing a text substitution with whoami command within the RewriteBase line?

    Thanks,
    gsherp
    See more | Go to post

  • gsherp
    replied to initializing 2d arrays in php
    in PHP
    Yeah...that is good. Thanks for all the help
    See more | Go to post

    Leave a comment:


  • gsherp
    replied to initializing 2d arrays in php
    in PHP
    I guess it goes down to this question....doe s one need to initialize a variable in php before using it?


    do i have to do this:
    Code:
    $variable = 0;
    ....
    $variable = $variable2 + $variable3;
    or can I just forgo the $variable=0; statement?

    Thanks for all the help
    See more | Go to post

    Leave a comment:


  • gsherp
    replied to initializing 2d arrays in php
    in PHP
    Don't I need to initialize it.....like set it to the value of 0. In case someone tries to access that array before it is ready. I don't want it to return a null or some random value.

    You declare the array name. The size is unknown. How do you initialize it without putting the array in a loop to set all the values at all the indexes to 0?

    hope that was clear.
    See more | Go to post

    Leave a comment:


  • gsherp
    started a topic initializing 2d arrays in php
    in PHP

    initializing 2d arrays in php

    How do i initialize a 2d array in php,
    if i use the 2d array in a class declaration.

    Code:
     
    class ANIMALS {
      var $array[ ] [ ] = 0;    //?? how do I initialize the array if I don't know what the size is going to be...
    
    .....
    }
    since I don't know how big size is going to be, ie...how many rows...
    How do I initialize it? say array was rows x 5 (columns)... rows is supposed...
    See more | Go to post

  • gsherp
    started a topic thread safe classes
    in C

    thread safe classes

    How does one go about making a class that is thread safe?

    Say we created the simple animal class
    Code:
    class animal
    {            public:
                virtual void eat() const { cout << " I eat like an animal. " << endl; }
                virtual ~animal() { }
    }
    how do i go about to ensure that this class is thread safe.

    I am new to the multi-threading subject....
    See more | Go to post
    Last edited by pbmods; Mar 8 '09, 05:54 PM. Reason: Added CODE tags.

  • gsherp
    started a topic How to detect ip address of remote computer
    in PHP

    How to detect ip address of remote computer

    I am trying to determine the ip address of a remote computer accessing my webpage. I do this to determine if the user if logged on elsewhere. If so, the server will reject actions from the previous location and log the user in from the new location. However, since all the computers are behind the gateway, I use $_SERVER['REMOTE_ADDR']; and only get the static ip of the gateway. Is there anyway to find out which specific computer is trying to...
    See more | Go to post
    Last edited by gsherp; Apr 3 '08, 09:40 PM. Reason: typo

  • I tried using the onunload, but it will trigger after the user navigates way from the page...in my application the user goes from page to page looking at customer data.
    So that is why i need to determine if the onunload occurred if the user clicked the windows [x] button.

    As far as cleaning up on log out...

    Customer Data is locked by a flag in the database when the user checks out for editing...there fore other...
    See more | Go to post

    Leave a comment:


  • Firefox Execute Javascript Code when user closes window

    How does one execute code when the user closes the browers window by clicking on the top right corner [x]. I need to log out user and do a database write when the user closes the brower. I do these to clean up the database when the user exits before actually logging out.

    I was told to user pageX, but does not seem to work either. Again, I am having trouble with firefox.

    Thanks.
    See more | Go to post

  • I found a simple solution avoid the conflicts with using both mootools and jquery
    togethor. I just use the jquery no conflict option and in mootools...afte r some searching on the internet, just don't use '$' when calling a function.
    See more | Go to post

    Leave a comment:


  • Does the browers load the <script src="..."> file at the beginning when the page loads? Once the <script> file is read by the browers, does it read it again?
    See more | Go to post

    Leave a comment:


  • gsherp
    started a topic <SCRIPT> in HTML / Multiple js frameworks

    <SCRIPT> in HTML / Multiple js frameworks

    Is there any way to dynamically change what script included in the HTML?

    Code:
    <span id="changeit"><script src="test1.js"></script></span>
    
    <input type="button" onClick="document.getElementById('changeit").innerHTML="<script src="test2.js"></script>" />
    Is there anyway for the <script>...
    See more | Go to post
    Last edited by gsherp; Jan 23 '08, 08:13 AM. Reason: additional info.

  • The onblur only works if inside the span element there is an input field.
    then the onblur is connected to the blurring action on the input field.
    See more | Go to post

    Leave a comment:


  • Thanks for the reply.

    I got around this problem by using an invisible input field in the innerHTML

    Code:
    document.getElementById(something).innerHTML = data + '<input name=datafield id=datafield value=data class=nosee>';
    This seems to work for me, so i decided to just go with this method.
    See more | Go to post

    Leave a comment:


  • gsherp
    started a topic Calling Javascript function within innerHTML

    Calling Javascript function within innerHTML

    Is there anyway to call a javascript function within an innerHTML call?

    example:

    Code:
    var someelement =  document.createElement("input"); 
    var someelement2  =  document.createElement("input"); 
    
    function test(str) { var str2 = test.substring(0,4); 
                               return str2; }
    
    someelement.ondblclick=function(){ 
           document.getElementById('someelement2').innerHTML='<input
    ...
    See more | Go to post

  • thanks,
    I will try this.
    See more | Go to post

    Leave a comment:


  • the innerHTML of a span element with text only, no form elements.
    See more | Go to post

    Leave a comment:


  • gsherp
    started a topic capturing innerHTML content through POST

    capturing innerHTML content through POST

    Hi,
    Is there easy way of capturing innerHTML content when the user submits the form? I tried using a hidden input field which works, however...is there any other way of doing this without using hidden input field?

    Thanks,
    Dave
    See more | Go to post

  • gsherp
    started a topic onblur event not working for span element

    onblur event not working for span element

    I have an element that is a span. The span is filled in with data using innerHTML.

    Code:
    var celldes = row.insertCell(2);
        var des = document.createElement('span');
        des.id='desc' + iteration; 
        des.name='desc' + iteration; 
        celldes.appendChild(des);
        des.innerHTML = "&nbsp;";
    
    des.onchange = function(){ SOME CODE }; //WORKS
    des.onblur = function(){
    ...
    See more | Go to post

  • Thanks,
    I got around the problem by adding a autofill=false in the attribute section.
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...