Jump to content

MGLP

Members
  • Posts

    28
  • Joined

  • Last visited

Posts posted by MGLP

  1. Quote

    My original problem was resolved.  I don't know exactly what the problem was but obviously it was some error in my preceding code.  I did some cleaning of my preceding code and then everything was OK.

    Concerning the NOT opening of a new window, you are absolutely correct. A new window is not being opened.  So I will amend my code accordingly.

    Many thanks for the tip on using the single quote instead of backslash double quote.  I've tried it and it works just fine as you said.

    Actually, many thank for everything.

     

  2. I've been using this type of code in loads of files / websites and it works perfectly, e.g. below from another of my files works fine.

    About the backslashes, I need to put those in for the quotes. Otherwise I get and error.  If I remember correctly, it's PHP requirement or is it Java?  Don't know but it works with backslash and it doesn't work without backslash.

     

    function mycontacts()

    {location.href=\"FT_Contacts.php\"; return false;

    window.open(location.href); return false;}

     

    <input type=\"button\" value=\"Contacts\" onclick=\"mycontacts()\">

     

     

  3. I have a button with onclick calling a function but nothing happens - no execution, no error msgs, just nothing but every thing else works perfectly.

    My code is:

    function goBack()
    {location.href=\"FT_Tree.php\"; return false;
    window.open(location.href); return false;}

    <input type=\"Button\" value=\"Home\" class=\"noprint\" style=\"background-color:lightgrey;height:30;width:150\" onclick=\"goBack()\">
     

  4. Quote

    No it's not the cache results. I did the F5 and the Ctrl+F5.  I've also closed and reopened my web site.  I've set up two different JPG files to make sure there is no mistake. The results are the same.  Very peculiar!  Whether my image is Up side Up or Up side Down (as seen with "Photos" or "Windows Photo Viewer"), my image is always Up Side Down in my web site.          

     

  5. I tried what you said but when I put the {}, I ended up with the little black square with the white X for all of my images.

    Re "checking the source code that is generated" I don't understand or don't know how to do that.

    All I know is my source code, I.e., my PHP file.  

    I've added a print command to print $Row[25] (which is the file name of the image) before the "img" tag is executed and the name is quite correct.  The file extension is not present but I don't think that matters (It works for other image files).

     

  6. Sorry.  I was probably not clear and my apologies for the error in the code I posted.

    My code is actually:

    [<img src=\"$Row[28]\" height=\"271\" width=\"380\">]    

    My "$Rows" comes from my code after getting a record from my database:   [$Row = mysql_fetch_row($Results);] 

    $Row[28] contains the file name/reference.  It's not a problem.

    It works fine for many of the image files (all JPG) I use in my testing.  But some of them show up as that little black box with a white X in it.  Yet when I open these files directly with MS Picture Manager or other software, there's no problem.

    Something else has come up.  Some of my images come out sleeping even if they have been saved standing (I hope I'm clear on that).

     

     

     

  7. This might not be an HTML problem but can anyone tell me why I get a little black square with a white X for

    [<img src=$Row[25]  height=\"325\" width=\"380\">]?

    My image files are jpg and I have no problem when I open them directly using MS Picture Manager or anything else.

    Thank you

  8. The Input tag type="file" ... will upload a file but how do we delete such uploaded files?

    When my user deletes his record (which contains the path/name to his uploaded file) from my database, I want to delete his file also.  But I have absolutely no idea how to do it.  I am totally baffled!

    Thanks for the much needed help.

  9. I get "Object of class DateInterval could not be converted to int" for my code (2nd line)

    [$mytoday=date('Y'."-".'m'."-".'d');

    if (date_diff(date_create($mytoday),date_create($Row[23]))<32)] 

    Note: My $mytoday = 2018-04-27  and my $Row[23] = 2018-04-26

    Yet, the PHP tutorial says:

    [$date1=date_create("2013-03-15");
    $date2=date_create("2013-12-12");
    $diff=date_diff($date1,$date2);]

    So my code should work but it doesn't.

    I put the exact code given by the PHP tutorial in my PHP file and it doesn't work.  I get the same error message as with my code.

    Thanks for your help.

     

  10. Why do I get a little black square with a white X for [<img src=$Row[25]  height=\"325\" width=\"380\">]?

    $Row[25] contains the file name and that works fine with my next 9 image tags.  It's a problem with the first image only; even if I change that image file.

    My file is a jpg and I have no problem when I open it directly using MS Picture Manager or anything else.

  11. In my form file I have 

    [<input type=\"checkbox\" name=\"stove\" id=\"stove\" value=\"y\">]

    I use [method=\"POST\"] on Submit.

    In my next file I have [$stove=$_POST['stove'];]  which works fine if the box was checked

    but if the box was not checked, I get error

     "Notice: Undefined index: stove in...."

    How can I test if the checkbox has been checked?

    Tks

  12. The database data is not a problem.  My problem was with things like forms where the form needs to serve two different languages.

    So all in all it seems I need to make two sets of php files - one for each language or one set with logic to display an English form or a French form.

    Many thanks for your help.

  13. In the euphoria of having gotten the solution to my first problem/question I forgot that I didn't get a reply to my 2nd problem/question which was:

    2) If I want to have a choice of French and English, do I need to have 2 separate set of files or is there a translation facility and if so, can you provide me the guidance.

    I should perhaps have also said    '... or 2 sets of code?'

    Example:  my form says:   Name:____________  Address: _____________ etc., etc., etc.

                     but if the user has selected French, then I want:   Nom:_____________   Adresse:______________ etc., etc., etc.

     

     

  14. re your point (1),  how do I save files using UTF-8?  My code is in Notepad files and I save them as PHP files.

    re your point (2), ok, I've put in the <meta charset("UTF-8")> in my code right after the <head> tag but still have the problem (I suppose because of point (1) not done.

    I understand your point 3 about the database and will do.

  15. 1) I have French wording in my site.  French has accents.  The accented letters show up as a ? in a diamond shape, i.e., .

    How can I get the correct accented letters to show?

    2) If I want to have a choice of French and English, do I need to have 2 separate set of files or is there a translation facility and if so, can you provide me the guidance.

    Thank you.

     

  16. My HTML is:

    [While($cntr < $NumRcds)
    {$cntr=$cntr+1;
    print("[<input type=\"radio\" name=\"choice\" id=\"rcd\" value=\"$Row[6]\"><br>");}]

    which gives me many records listed with each having a radio button.

    Upon Submit, I want to test if at least 1 button has been checked.

    My Java is the following and I've tried various other versions non of which work.

    Can you tell me what the code should be.

    [function formcheck()
    {if(name.choice.checked==true){return true;}
    else{alert(\"At least one record must be selected in order to DELETE.\");return false;}}]

    Thank you

     

×
×
  • Create New...