Open link with POST parameter

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Open link with POST parameter

Zoullou
Hi,

Could i open a link by passing POST parameter. I want to use shadowbox to open sports result page but i have to passe player ID parameter by POST request.

How could i do that ??

Thanks
Yours
Reply | Threaded
Open this post in threaded view
|

Re: Open link with POST parameter

Zoullou
Hi,

I found the solution ^_^

For people who want to do the same thing :

Edit the "skin main" template and add your form in the "shadowbox_body_inner" div :

<form style="dislay:none;" method="post" name="classement" action="http://...">
  <input name="Action" value="consultation_joueur_rechercher" type="hidden">
  <input name="recherche_text_licence" value="" type="hidden">
</form>

Modify the loadContent method, in the iframe case, in the showBars function, found "win.location = obj.content;". This is the call that load the page. I replace it with this code:

if(obj.licence == '') {
  win.location = obj.content;
} else {
  window.document.classement.target='shadowbox_content';
  window.document.classement.recherche_text_licence.value = obj.licence;
  window.document.classement.submit();
}

To finish, i put parameter to my form by using link with : rel=shadowbox;licence=123456789

Yours