Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Deleting Problem

by Anonymous Monk
on Aug 09, 2005 at 18:02 UTC ( [id://482339]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Deleting Problem
by shemp (Deacon) on Aug 09, 2005 at 19:07 UTC
    Why oh why oh why oh why would you turn off strict for testing purposes? This seems like a horrible idea. What exactly are you trying to gain by turning off strict???

    The only good time to turn off strict would be in a very tight code block that does something that specifically needs strict off, and then immediately turn it back on.

    The easiest way to screw up is to misspell a variable name, and with strict on this is automatically caught.


    I use the most powerful debugger available: print!
      This is not the root of my problem right now, I wish it was....
Re: Deleting Problem
by merlyn (Sage) on Aug 09, 2005 at 19:14 UTC
      Ok thanks, I figured it out... I submited the hidden field using a checkbok and javascript to do the job, but thanks anyway.
        You could consider replacing these bits of code
        $dest_data="dest_data".$i; $dest_temp=param($dest_data); if ($dest_temp eq "A"){ $selected1="selected"; } else {$selected1=" ";} if($dest_temp eq "B"){ $selected2="selected";} else{$selected2=+" ";} if($dest_temp eq "C"){ $selected3="selected";} else{$selected3=" ";} if($dest_temp eq "D"){ $selected4="selected";} else{$selected4=" ";} if($dest_temp eq "E"){ $selected5="selected";} else{$selected5=" ";} if($dest_temp eq "F"){ $selected6="selected";} else{$selected6=" ";} if($dest_temp eq "G"){ $selected7="selected";} else{$selected7=" ";} if($dest_temp eq "H"){ $selected8="selected";} else{$selected8=" ";} if($dest_temp eq "I"){ $selected9="selected";} else{$selected9=" ";} if($dest_temp eq "J"){ $selected10="selected";} else{$selected10=" ";} if($dest_temp eq "K"){ $selected11="selected";} else{$selected11=" ";} print "<SELECT NAME=\""; $dest_data="dest_data".$i; print $dest_data; print "\">"; print "<OPTION VALUE=\"\">SELECT</OPTION> <OPTION VALUE=\"A\" $selected1>A</OPTION> <OPTION VALUE=\"B\" $selected2>B</OPTION> <OPTION VALUE=\"C\" $selected3>C</OPTION> <OPTION VALUE=\"D\" $selected4>D</OPTION> <OPTION VALUE=\"E\" $selected5>E</OPTION> <OPTION VALUE=\"F\" $selected6>F</OPTION> <OPTION VALUE=\"G\" $selected7>G</OPTION> <OPTION VALUE=\"H\" $selected8>H</OPTION> <OPTION VALUE=\"I\" $selected9>I</OPTION> <OPTION VALUE=\"J\" $selected10>J</OPTION> <OPTION VALUE=\"K\" $selected11>K</OPTION> </SELECT>";
        with something like this (untested)
        $dest_data="dest_data".$i; print qq!<select name="$dest_data"><option value="SELECT">!; for my $val ('A'..'K'){ my $sel=($val eq param($dest_data)) ? "SELECTED" : ""; print qq!<option value="$val" $sel>$val!; } print q!</select>!;
        poj
Re: Deleting Problem
by Tanalis (Curate) on Aug 09, 2005 at 18:16 UTC
    Not without a hint, no.

    What error message do you get? That'll give you a starting point to help you figure out what's going wrong.

    Once you know what the error is, try to track down the bit of code that's going wrong, and post that. Posting your entire script with "it doesn't work" doesn't give us much to go on ...

    From rereading, if you're adding new functionality, read the docs and give it a go. When you run into trouble, and have a specific question, post it and ask.

    A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://482339]
Approved by gellyfish
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-19 03:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found