Posts Tagged ‘button’

This tutorial about Hide and Seek with jQuery and PHP. This script helps you to present all modules in single page. Take a look at live demo click buttons

 


Download Script     Live Demo

Javascript Code

// <![CDATA[
javascript” src=”http://ajax.googleapis.com/ajax/
// ]]>
libs/jquery/1.3.0/jquery.min.js”>
<script type=”text/javascript”>
$(function()
{

$(“.button”).click(function()
{
var button_id = $(this).attr(“id”);

//Add Record button

if(button_id==”add”)
{
$(“#results”).slideUp(“slow”);
$(“#save_form”).slideDown(“slow”);
}

//Cancel button

else if(button_id==”cancel”)
{
$(“#save_form”).slideUp(“slow”);
$(“#results”).slideDown(“slow”);
}

// save button
else

{

// insert record
// more details Submit form with jQuery

}

return false;

});
});
</script>

HTML Code
Contains javascipt code. $(“.button”).click(function(){}- button is the class name of buttons(Add, Save and Cancel). Using $(this).attr(“id”) calling button id value.

<div id=”results” >

<a href=”#”color: blue;”>button” id=”add” >Add Record </a>
</div>

<div id=”save_form” style=”display:none” >

<a href=”#”color: blue;”>button” id=”save” >Save </a>
<a href=”#”color: blue;”>button” id=”cancel” >Cancel </a>
</div>

<div id=”update” >

</div>

Image representing PayPal as depicted in Crunc...

Reference PayPal site.
This chapters describes how to cancel one, some, or all of your customers’ subscriptions.
Cancelling Individual Subscriptions
You can cancel a subscription by going to the Subscription Details page.
Go to the History subtab of the My Account tab, choose the Subscriptions field from the Show drop-down menu, and click the Submit button. Click on the link in the Status column to view the Subscription Details, and click the Cancel button on the Subscription Details page.
1.
Alice logs in to her PayPal account, and clicks on the Active link in the Status column for the subscription she wishes to cancel.
You can also get to the Subscription Details page by clicking on the In reference to link in the Transaction Details for any subscription payments you receive.
2.
To cancel this subscription, Alice can click the Cancel Subscription button and follow the on-screen instructions.
3.
The Subscription is now listed as Cancelled in Alice’s transaction history
Your subscribers can cancel their subscriptions by following the same steps. In addition, if you choose to add a Cancel Subscription button to your website, your subscribers may press it to cancel their subscriptions. A subscription may be cancelled up until the day of the next scheduled payment. If a subscriber attempts to cancel before payment is sent on the day of a scheduled payment, the payment will not be made.
Cancelling Multiple Subscriptions At Once
If you cancel an email address which has several subscriptions, all of the subscriptions will be cancelled.
To cancel a group of subscribers, go to the History subtab of the My Account tab, choose the Subscriptions field from the Show drop-down menu, and click the Submit button. Click on the link in the Status column to view the Subscription Details of one of your active subscribers. Click the Cancel Several Subscribers link at the bottom of the Subscription Details page to open the Mass Subscription Cancellation page.
To cancel several subscribers, you will need to upload a simple text file containing your subscribers’ email addresses (one email per line). Once your file has been read, confirm that we found the correct number of email addresses, and click the Cancel Subscriptions button.
To view the details of your Mass Subscription Cancellation, go to your history and click on the Status of the Mass Subscription Cancellation entry.
Note:
It may take up to one hour to process your cancellation.
Your mass subscription cancellation log may contain the following terms:
l
Total Emails: Number of email addresses uploaded from your file.
l
Emails Matched: Number of email addresses that matched an active subscription. These active subscriptions were then cancelled. Please note that if any email address had more than one active subscription, all of the subscriptions were cancelled.
l
Emails Not Matched: Number of email addresses that did not match with an active subscription. If the subscription was already completed or cancelled, it will be counted as “Not Matched.”
l
Successful Cancellations: Total number of subscriptions cancelled. Please note that this number may be higher than the number of emails matched if any email address had more than one active subscription.
For more details about your Mass Subscription Cancellation, click the View Details button on the Transaction Details page. You will be prompted to download a file containing more information.
Your downloaded mass subscription cancellation log may contain the following terms:
l
Email Address: Email of subscriber
l
Success: The subscription was successfully cancelled
l
Failed: The subscription was not cancelled. Failure reasons include:
l
Already cancelled
l
Already completed: The subscription was completed prior to the cancellation
l
Failed: General failure code
l
No Match: The email address did not match any of your subscriptions
l
Subscription ID: Unique ID for the subscription
l
Date Processed: Cancellation date

The example below illustrates how you can convert the HTML of RadEditor to PDF format using an HTML2PDF convertor tool of Tall Components. For a live demo, please go to http://www.tallcomponents.com/cp0803.aspx

 

ASPX code

<form id=”Form1″ method=”post” runat=”server”>
    RadEditor id=”RadEditor1″ Runat=”server”>
    <asp:button id=”showPDF” runat=”server” Text=”Show PDF”></asp:button>

C# code

private void showPDF_Click(object sender, EventArgs e)
{
    string html = “<html>” + RadEditor1.Html + “</html>”;
    TallComponents.PDF.Layout.Document document = new TallComponents.PDF.Layout.Document();
    TallComponents.PDF.Layout.Section section = document.Sections.Add();
    TallComponents.PDF.Layout.HtmlParagraph htmlParagraph = new TallComponents.PDF.Layout.HtmlParagraph();
    htmlParagraph.FontPath = “fonts“;
    htmlParagraph.Text = html;
    section.Paragraphs.Add( htmlParagraph );
    Response.Clear();
    document.Write( Response );
    Response.End();
}

VB.NET code

Private Sub showPDF_Click(ByVal sender As Object, ByVal e As EventArgs)
 Dim html As String = “<html>” + RadEditor1.Html + “</html>”
 Dim document As TallComponents.PDF.Layout.Document = New TallComponents.PDF.Layout.Document
 Dim section As TallComponents.PDF.Layout.Section = document.Sections.Add
 Dim htmlParagraph As TallComponents.PDF.Layout.HtmlParagraph = New TallComponents.PDF.Layout.HtmlParagraph
 htmlParagraph.FontPath = “fonts”
 htmlParagraph.Text = html
 section.Paragraphs.Add(htmlParagraph)
 Response.Clear
 document.Write(Response)
 Response.End
End Sub

ASPX code

<form id=”Form1″ method=”post” runat=”server”>
    ScriptManager ID=”ScriptManager1″ runat=”server” />
    <telerik:RadEditor id=”RadEditor1″ Runat=”server”>
    <asp:button id=”showPDF” runat=”server” Text=”Show PDF”></asp:button>
</form>

C# code

private void showPDF_Click(object sender, EventArgs e)
{
    string html = “<html>” + RadEditor1.Content + “</html>”;
    TallComponents.PDF.Layout.Document document = new TallComponents.PDF.Layout.Document();
    TallComponents.PDF.Layout.Section section = document.Sections.Add();
    TallComponents.PDF.Layout.HtmlParagraph htmlParagraph = new TallComponents.PDF.Layout.HtmlParagraph();
    htmlParagraph.FontPath = “fonts”;
    htmlParagraph.Text = html;
    section.Paragraphs.Add( htmlParagraph );
    Response.Clear();
    document.Write( Response );
    Response.End();
}

VB.NET code

Private Sub showPDF_Click(ByVal sender As Object, ByVal e As EventArgs)
 Dim html As String = “<html>” + RadEditor1.Content+ “</html>”
 Dim document As TallComponents.PDF.Layout.Document = New TallComponents.PDF.Layout.Document
 Dim section As TallComponents.PDF.Layout.Section = document.Sections.Add
 Dim htmlParagraph As TallComponents.PDF.Layout.HtmlParagraph = New TallComponents.PDF.Layout.HtmlParagraph
 htmlParagraph.FontPath = “fonts”
 htmlParagraph.Text = html
 section.Paragraphs.Add(htmlParagraph)
 Response.Clear
 document.Write(Response)
 Response.End
End Sub

In the “Article Files” section, there is attached a sample project with RadEditor 6.1 demonstrating the described functionality.

Article Links

I can provide two ways,

a.jsp:

<html>
<script language="javascript" type="text/javascript">
function call(){
var name = "xyz";
window.location.replace("a.jsp?name="+name);
}
</script>
<input type="button" value="Get" onclick='call()'>
<%
String name=request.getParameter("name");
if(name!=null){
out.println(name);
}
%>
</html>

2)b.jsp:

<script>
var v="xyz";
</script>
<% String st="<script>document.writeln(v)</script>";
out.println("value="+st); %>