Jump to content

function __doPostBack


StirCrazy

Recommended Posts

I'm trying to figure out how this __doPostBack function works in relation to the date form below.

 

I'm trying to get a commission report for another site and want to find out what variables it posts and in what format.

 

Can anyone help?

Sample below.

 

Oh and just a side note (that should be in the PHP forum but you may know) Is it possible to post variables using PHP CURL to an .aspx page?

 

Regards,

S.C>

 

 

<form name="Form1" method="post" action="report.aspx" id="Form1">

<input type="hidden" name="__EVENTTARGET" value="" />

<input type="hidden" name="__EVENTARGUMENT" value="" />

 

 

<script language="javascript" type="text/javascript">

<!--

function __doPostBack(eventTarget, eventArgument) {

var theform;

if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {

theform = document.Form1;

}

else {

theform = document.forms["Form1"];

}

theform.__EVENTTARGET.value = eventTarget.split("$").join(":");

theform.__EVENTARGUMENT.value = eventArgument;

theform.submit();

}

// -->

</script>

 

 

<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0">

<TR>

<TD><STRONG class="text"><span id="QuickDateSelector1_lblLangText820">Change date range</span>

</STRONG>

</TD>

<TD></TD>

</TR>

<TR>

<TD><STRONG class="text"><span id="QuickDateSelector1_lblLangText821">From</span></STRONG></TD>

<TD><STRONG class="text"><span id="QuickDateSelector1_lblLangText822">To</span></STRONG></TD>

</TR>

<TR>

<TD>

<select name="QuickDateSelector1:ddlStartDay" id="QuickDateSelector1_ddlStartDay" class="smalltext" style="font-size:XX-Small;">

<option value="1">1</option>

<option value="2">2</option>

<option value="3">3</option>

<option value="4">4</option>

 

</select>

<select name="QuickDateSelector1:ddlStartMonth" id="QuickDateSelector1_ddlStartMonth" class="smalltext" style="font-size:XX-Small;">

<option value="1">Jan</option>

<option value="2">Feb</option>

<option value="3">Mar</option>

<option value="4">Apr</option>

 

</select>

<select name="QuickDateSelector1:ddlStartYear" id="QuickDateSelector1_ddlStartYear" class="smalltext" style="font-size:XX-Small;">

<option value="2002">2002</option>

<option value="2003">2003</option>

<option value="2004">2004</option>

<option value="2005">2005</option>

<option value="2006">2006</option>

<option value="2007">2007</option>

 

</select></TD>

<TD>

<select name="QuickDateSelector1:ddlEndDay" id="QuickDateSelector1_ddlEndDay" class="smalltext" style="font-size:XX-Small;">

<option value="1">1</option>

<option value="2">2</option>

<option value="3">3</option>

<option value="4">4</option>

 

</select>

<select name="QuickDateSelector1:ddlEndMonth" id="QuickDateSelector1_ddlEndMonth" class="smalltext" style="font-size:XX-Small;">

<option value="1">Jan</option>

<option value="2">Feb</option>

<option value="3">Mar</option>

<option value="4">Apr</option>

 

</select>

<select name="QuickDateSelector1:ddlEndYear" id="QuickDateSelector1_ddlEndYear" class="smalltext" style="font-size:XX-Small;">

<option value="2002">2002</option>

<option value="2003">2003</option>

<option value="2004">2004</option>

<option value="2005">2005</option>

<option value="2006">2006</option>

<option value="2007">2007</option>

 

</select></TD>

</TR>

</TABLE>

<a id="QuickDateSelector1_lnkRunReport" class="boldblue" href="javascript:__doPostBack('QuickDateSelector1$lnkRunReport','')" style="width:67px;">Run Report</a><BR>

<BR>

<STRONG>

<TABLE cellSpacing="0" cellPadding="0" width="100%" border="0">

<TR class="text">

<TD style="WIDTH: 92px"><STRONG><span id="QuickDateSelector1_lblLangText823">Quick Links:</span></STRONG></TD>

<TD colSpan="3">

<a id="QuickDateSelector1_lnkLast7Days" class="text" href="javascript:__doPostBack('QuickDateSelector1$lnkLast7Days','')">Last 7 days</a>|

<a id="QuickDateSelector1_lnkLast30Days" class="text" href="javascript:__doPostBack('QuickDateSelector1$lnkLast30Days','')">Month to date</a> |

<a id="QuickDateSelector1_lnkLastCalendarMonth" class="text" href="javascript:__doPostBack('QuickDateSelector1$lnkLastCalendarMonth','')">Last calendar month</a></TD>

</TR>

</TABLE>

</STRONG>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.