Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: [Free Nodelet Hack Feature Request] "POST 2 GET"

by ccn (Vicar)
on Nov 25, 2008 at 10:29 UTC ( [id://725811]=note: print w/replies, xml ) Need Help??


in reply to [Free Nodelet Hack Feature Request] "POST 2 GET"

Update: [Tue, 25 Nov 2008 17:40:25 GMT] Disable the feature for strangedocs, and use macros as jdporter said.

<script type="text/javascript"> <!-- function blazar() { if ('strangedoc' == '`root_type_title`') return; var frms = document.forms; for (var i=0; i < frms.length; i++) frms[i].action = frms[i].action + 'node_id=`id`'; } setTimeout('blazar()', 500); // --> </script>
<script type="text/javascript"> function blazar() { if(/(node_id=\d+|node=`[^;&`]+)/.test(document.location.search)) { var frms = document.forms; for (var i=0; i < frms.length; i++) frms`[i`].action = frms`[i`].action + RegExp.$1; } } setTimeout('blazar()', 500); </script>

I personally believe *wink* that POST to GET substitution is not good. Just because a browser would not ask to resubmit posted data and the user will unintentionally repost own messages to CB, etc.

So I suggest an ugly hack to add GET parameters (node_id or node) to forms' actions

Replies are listed 'Best First'.
Re^2: [Free Nodelet Hack Feature Request] "POST 2 GET"
by jdporter (Paladin) on Nov 25, 2008 at 15:09 UTC

    See Help for Free Nodelet Settings for info on the value macros available.

    function blazar() { var frms = document.forms; for (var i=0; i < frms.length; i++) frms[i].action = frms[i].action + 'node_id=`id`'; } setTimeout('blazar()', 500);
    Between the mind which plans and the hands which build, there must be a mediator... and this mediator must be the heart.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://725811]
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: (4)
As of 2024-04-25 14:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found