WordPress LightBox passing Get Variable Problem Solution

On 6th january i have got an Error in WordPress LightBox Plugin to pass GET Variable

I found the solution by Javascript

Here is code for that

1.This is my Scirpt put in Additional script in wordpress but you can also put in .js file anywhere on any php file

<script language="javascript">

function getVaribaleConcate(){

//these are the form object which i want to pass in get variable

var j = document.getElementById("eml").value;
 var s =  document.getElementById("ticket").value;
 document.getElementById("pad").href = "viewstatus.php?m=" + j;
 document.getElementById("pad").href += "&t=" + s;

You can Also put any no of variable in above code


document.getElementById("pad").href += "&t=" + s;

this is the final string which assign to href of anchor tag

2.Now Call this from any Link Click Or From any Event And Call LightBox


<a href=”Example.php?” onclick=” getVaribaleConcate()” rel=”LighBox”>Click Here</a>

Here LightBox Indicating the Code for Your LighBox Installplugin which is inbuilt in wordpress

href=example.php?  indicating  HyperReference File where we want to Submit our data

Onclick getVaribaleConcate() Use to concate The get Varible in url

3.The Example.php where the lightbox is calling and GetVariable is Display in that file


if(isset($_GET['m']) && isset($_GET['t']) && $_GET['m'] != '' && $_GET['t'] != '')


$email = $_GET['m'];

$ticket = $_GET['t'];

echo  $email . “<br/>”;

echo $ticket;



I hope this code may be help u


Speak Your Mind

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: