i am reading a flat text file to an array and then looking at each line for a string. I want to perform an operation if i find the exact string
$string = abc;
if ($line =~ /$string/) { do soemthing }
however, this will find abcd and zabc.
i only want to allow
::abc::
::abc|
|abc|
|abc...
i found the menu code below. the original code dropped down sub-menus onmouseover. i changed to onclick and would like to change further so once any menu bar item is clicked, all menus will drop down onmouseover (like the menu bar of windows programs). i attempted several things (the most...
i am trying to validate a price field as any number of numerals (but not required like $.99) followed by a decimal (but no required like $9)followed by 1 or 2 numerals (but not required like $9 or $9.).
i start by removing leading and trailing white space and stripping spaces, commas and $...
in the image width code - i only alot 100 pixels for image width so i restrict image width to 100 if it's actually > 100. if width < 100 i allow the width to be whatever it actually is.
i could use $w = $width; $w = 100 if ($width > 100);
then always include width = $w in the img tag...
...i found the problem with Image::Size
i forgot to include the path to the image
($width,$height) = imgsize("/home/.../ad_photos/$image1");
i still have the issue with the file size.
thanks.
problem1
i use the script below to allow image upload through my site. although i restrict the file size to 20Kb with
$CGI::POST_MAX = 1024 * 20;
i am able to upload any file size.
use File::Basename;
$CGI::POST_MAX = 1024 * 20;
$safe_filename_characters = "a-zA-Z0-9_.-";
@images =...
let me find a rock to crawl under....
i forgot method=post - aarrrgh!
i must have checked the form tag a thousand times - mostly concerned with the 'enctype'. i copied/pasted it from several different sources, re-typed it, used single quotes/double quotes, etc.
thanks.
More info....
i added a check to the script to display (on the results page) the upload_filehandle and the image path that shows in the upload form.
the path to the image C:/..... doesn't show. i guess it's stripped during form processing. how do i get around that?
i'm testing the script in...
i want to allow user to upload up to 4 images so i use the following code i found.
i modified it to loop through each image field name and process it if an image was uploaded.
the script performs properly except the files on my server are 0 bytes - the file isn't actually getting uploaded...
i have a data table containing sometimes hundreds of rows - each with it's own 'edit' link.
the link contains an onclick call to javascript to show a div in the next table row.
function make(item){
document.getElementById(theDIV).innerHTML = '<form name=invEdit'+item+' onSubmit="return...
i want to show 4 messages to my site users concerning my product shipping times:
Saturday and Sunday US EST - no shipping
Prior to 8 am US EST - Shipping not currently available
After 12 noon US EST - call immediately if shipping required today
After 3:30 pm US EST - shipping is no longer...
thanks again.
your code may have accomplished the same thing, but i wasn't seeing it. however, it did get the thought juices flowing and i came up with this
for (i=0;i<totalOptions;i++) {
if (document.myForm5.elements[i].checked == true) {
if (document.myForm5.elements[i].value ==...
thanks for the quick response.
while testing it further i realized what's happening - it's based on something i left out.
my base application is the form, but i have a 'div' tag inside the form.
there is a js sort function that re-writes the div based on dropdown selections so while i start...
i have a form with 10 checkboxes
<INPUT type="checkbox" value=1>.....
<INPUT type="checkbox" value=10>
i have a validation where if checkbox 10 is checked, extra info is displayed versus when it is not checked
for (i=0;i<totalOptions;i++) {
if (document.myForm5.elements[i].checked...
i couldn't find where the file was being uploaded to so i used the following code to save the file where i want it - i remove the file after the email.
$file=~m/^.*(\\|\/)(.*)/; # strip the remote path and keep the filename
my $name = $2;
$path = "../../ads/$name";
open(LOCAL, ">$path") or...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.