Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Form doesn't get updated after submission to same page

by iguanodon (Priest)
on Oct 17, 2006 at 10:23 UTC ( #578730=note: print w/replies, xml ) Need Help??

in reply to Form doesn't get updated after submission to same page

Check out -nosticky and -override in the docs.

  • Comment on Re: Form doesn't get updated after submission to same page

Replies are listed 'Best First'.
Re^2: Form doesn't get updated after submission to same page
by Hue-Bond (Priest) on Oct 17, 2006 at 11:23 UTC

    This site is wonderful! Just 20 minutes! Pizza delivery takes longer!

    Check out -nosticky

    It doesn't work™. Replacing the use line with use CGI qw/-nosticky/; doesn't change anything. The documentation of -override mentions -no_sticky so I tried it too, to no avail (it must be a typo). Also tried $q->nosticky, $q->nosticky (1) and $CGI::NOSTICKY = 1 after some googling.

    and -override

    This solves the problem, although it has the drawback that I have to add it everywhere. Thank you!

    David Serrano

      Peaking at the source suggests that $CGI::nosticky(1) should work as well.

      You probably want to also force a refresh in your browser. Some/most browsers will remember the contents of fields for you as well so determining if its CGI or your browser can be annoying. Check the source produced by your code. If you are using -nosticky then it should be outputing the value you define in the script, otherwise it should be outputing the value last entered (/me thinks).

      Eric Hodges

        $CGI::nosticky(1) is a syntax error, like saying package CGI; $nosticky(1);. What is happening now is that the values of the dropdown must have at least two characters. If they have one, they don't get updated, even if I use -nosticky and -override :^). Workaround: do ['01' .. '31'] instead of [1 .. 31]. Oh well.

        Since this is yet another XP stats tool, I'm leaving it alone. I'm not specially proud of the code, and I was planning to post a SoPW along with it, asking for some flames.

        David Serrano

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://578730]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2022-05-25 04:19 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (84 votes). Check out past polls.