Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: PERL CGI Form Processing while URL change

by ww (Bishop)
on May 10, 2013 at 20:28 UTC ( #1033028=note: print w/ replies, xml ) Need Help??


in reply to PERL CGI Form Processing while URL change

"third div gets floated towards left side"

Check your css. Check your markup. Smells as though you have problems with one or both of those.

AND IN ANY CASE, the Monastery's crystal ball has been broken for a long time, so we sometimes fail to offer relevant suggestions to problems for which neither code nor spec is shown.


If you didn't program your executable by toggling in binary, it wasn't really programming!


Comment on Re: PERL CGI Form Processing while URL change
Re^2: PERL CGI Form Processing while URL change
by msinfo (Sexton) on May 10, 2013 at 20:40 UTC
    Thanks, but CSS is not my main concern. Below is code of form present on http://localhost
    <form action="http://localhost/cgi-bin/env.pl" method="POST"> <input id="q" type="text" size="15" name="query" value="" /> </br> <input type="submit" value="Find" /> </form>

    This form method works fine on homepage.

    But when user submits a query, and URL changes to http://localhost/cgi-bin/env.pl, the form doesn't work anymore. Page http://localhost/cgi-bin/env.pl also contains same form code as present on homepage.

    As far as I have read about Web development I know for this case Ajax, is good solution. But I want to know what wrong I did, in this case.

      Page http://localhost/cgi-bin/env.pl also contains same form code as present on homepage.

      If that were true, then it stands to reason that the 2 pages would behave the same. Since they don't, I suspect there is a difference.

        Actually code is same in both pages, for form. And what I found was, when first I make search on homepage, using same form, it give results and page/url migrates to env.pl, where same form is present, now when I search again using same form, it works an prints results. But next time, i.e second time on env.pl, it breaks.

        I also don't know what is the reason for working at first time, and not working at second time. Now, I am using cg::ajax, so now this is no problem for me, but I would like to hear some reason for it, to increase my knowledge.

        thanks for your time

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2014-12-26 13:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (171 votes), past polls