Web Forms :: Reload Of A Page With Java Applet
Feb 21, 2011
I have an aspx page with a java applet. At the end of the execution, the applet navigates to another aspx page, in which there is a button that gives the possibility to execute the applet again. I would like this second page to reload every time the applet calls it, but unfortunatelly this doesn't happen. If I start from the applet's page, all works fine; but if I call the applet's page from the other one, when the applet redirects to this second page the load event does not fire. Probably the code could be clearer, so this is it:
Dummy.aspx
[Code]....
Dummy.aspx.vb
[Code]....
View 2 Replies
Similar Messages:
Dec 3, 2010
I have a need to integrate a third-party Java applet into a custom web part I wrote for SharePoint 2007. The web part simply loads a user control I created that contains the bulk of the functionality, and that's where the applet will go. I added it to my user control project and it works fine outside of my SharePoint environment.
I installed the updated web part onto my MOSS 2007 development site and the part's page loads fine. The applet is triggered by clicking a link button on the page, which runs some client-side JavaScript to start it. The problem is nothing seems to happen when I click the link. No error messages appear, and the stuff the applet is supposed to do never occurs (it's for doing file transfers via FTP). I have the .jar file as an embedded resource in my user control DLL, which is deployed to the bin folder, and SharePoint fully trusts this DLL.
I used Firebug to step through the initialization code and I saw an HTTP GET that failed with a message about not being authorized, but it didn't give any details and I'm not positive it was related to the applet. Is there anything special I need to do to make the applet work? Or am I going about this the wrong way?
EDIT: The problem turned out to be the .jar file for the applet couldn't be found. SharePoint is clearly doing something different here, and I need to find out what. Can Java applets be used within a SharePoint site? This question suggests they can, but in that case a Page Viewer web part was used, which isn't going to really work for me.
View 2 Replies
Jan 6, 2011
I had came acroos an open source a java applet. I wanted to know is there somehow I could create a script that could be distributed and the applet could be embedded in any website? I have been able to inject jquery and JS scripts into websites by placing a tag pointing to a Javascript file and placing it in the header of the page but I don't know how a java applet can be injected?
View 1 Replies
Jun 6, 2010
how to upload a file using java applet to asp.net sites.
View 1 Replies
Feb 14, 2011
I have created a Java Applet that will be used in IE to print images from a remote server. I load the applet in a new popup window from my main web page and it prints fine, but it locks up the new popup browser window while it is printing. When the print job is complete the popup window becomes responsive again. The main browser window remains functional during the printing. Is there something I can do during the printing process to cause it to yield so the popup does not lock up?
package javaprint;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.image.BufferedImage;
import java.awt.image.ImageObserver;
import java.awt.print.*;
import java.io.IOException;
import java.io.InputStream;
import java.net.Proxy;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;
public class jPrinter implements Printable
{
String ASP_NET_SessionId = null;
ArrayList<URL> pages = new ArrayList<URL>();
BufferedImage lastImage = null;
int lastRequestedIndex = 1;
public EcPrinter(ArrayList<URL> pages, String sessionId)
{
Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
ImageIO.setUseCache(false);
this.pages = pages;
ASP_NET_SessionId = sessionId;
}
public int print(Graphics graphics, PageFormat pageFormat, int pageIndex)
{
if (pageIndex < pages.size())
{
URL url = pages.get(pageIndex);
BufferedImage img = null;
if (pageIndex == lastRequestedIndex)
{
img = lastImage;
}
else
{
URLConnection connection = url.openConnection(Proxy.NO_PROXY);
connection.setRequestProperty("Cookie", "ASP.NET_SessionId=" + ASP_NET_SessionId);
InputStream is = connection.getInputStream();
img = ImageIO.read(is);
lastImage = img;
}
graphics.drawImage(img, 0, 0, null);
return PAGE_EXISTS;
}
return NO_SUCH_PAGE;
}
}
View 1 Replies
Jan 4, 2011
Recently, I had prepared a java applet for my browser. I wanted to know is there somehow I could create a script that could be distributed and the applet could be embedded in any website?
View 4 Replies
Jul 1, 2010
In one website I am working on we're using a java applet in 2 places: the 1st one in a public area where it works just fine and one in a protected folder where it just doesn't work. The protection is performed with forms authentication. The error is shown below. Any clue ?
java.lang.ClassFormatError: Incompatible magic value 218774561 in class file activeup/activeupload/UploadApplet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassFormatError: Incompatible magic value 218774561 in class file activeup/activeupload/UploadApplet
View 4 Replies
May 26, 2010
I am trying to write an asp.net webpage which contains an applet. Everything works fine when I run this in a development folder, but when I move it to the IIS web server public folder it doesn't work anymore. I don't get any error message. The browser doesn't repaint the applet area Here is the source code:
//web page
<script src="http://www.java.com/js/deployJava.js"></script>
<script>
var attributes = { code:'ImageApplet.class', archive:'ImageApplet.jar', width:864, height:1000} ;
var parameters = {jnlp_href: 'image-applet.jnlp'} ;
deployJava.runApplet(attributes, parameters, '1.4');
</script>
//applet
public void init() {
buildUI();
}
public void buildUI() {
JButton jumbleButton = new JButton("Jumble");
jumbleButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
};
});
add("South", jumbleButton); }
View 2 Replies
Jul 7, 2010
I have a web user control that actually takes a zipcode and based on that brings all the store locations. I am using this contol on couple of places. That works, but I have set of html pages and on one of them I have to setup the same functionality where user inputs zipcode and store locations are displayed to him/her.My question, Can I use that web user control as an applet on my html page without writing html markup and get post methods to achieve the same functionality?
View 1 Replies
Dec 18, 2010
I have a grid where user will click on a button provided in each row to download the file.
After each download I want to update the download attempt.
but since I am using force download my databind method does not make any difference in the page.
View 4 Replies
Feb 28, 2011
I have an input form on a page along with gridview and combo box. a user first select a filter combo box then click on search, to see a return values in a grid view format. then a user can enter new row once he / she cick add, i want the page to reload and the new inserted value to show in the gridview.
View 1 Replies
Jan 6, 2011
I have 2 asp:TabContainers on the Page. The first one contains an Image control. The second one has a dynamic TreeView on one of the TabPanels. When I click one of the treenodes I change the URL of the image in the First TabContainer. However it refreshes the entire page. How to prevent that from happening? Below is the code behind when the treenode is clicked.
[Code]....
View 3 Replies
Nov 17, 2010
I have a panelA with a drop down list (ddl1) and a panelB with 2 dropdown lists (ddl2 and ddl3).
I am disabling PanelB in the page_Load section. When a selection has been made in the ddl1 in panelA, I am enabling panelB in OnSelectedIndexChanged event to enable ddl2 and ddl3.
This process is working, but as soon as I make a selection on ddl1, the whole page reloads to enable ddl2 and ddl3, which feels odd. How can I make it just reload panel3 not the whole page? I guess it can be done using AJAX update panel but as soon as I put <%@ Register Assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxtoolkit" %> and <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>, I start getting wierd error: Microsoft JScript runtime error: Sys.ArgumentTypeException: Object of type 'Object' cannot be converted to type 'Array'.
Parameter name: array
View 4 Replies
Jun 10, 2013
Redirect a page without reload/refresh the page.
Like gmail account.
View 1 Replies
Oct 23, 2013
I just want to know how to detect a page is refreshed or reloaded apart from Postback. Just clicking the reload button in the browser...
View 1 Replies
Apr 11, 2010
I want to reload the page when the user clicks on the back button, from a particular page.Say for example there are three pages:
Page1.aspx,Page2.aspx,Page3.aspx
I want when user move from Page2 to Page3. When he clicks on "Back" button on browser page shld load I have tried adding a onload function JS in Page2 it works out. The issue is identifying user is coming from Page3.
View 5 Replies
May 5, 2010
i have a page it contains a User Control. in it we have a Button "View Tree" it will open a pop up window (contins a tree view).when we select any node in the tree the Corresponding item will be Loaded in the User Control and Close the Popup.i want to achive this With out re loading the total page. i am using VS 2008.
View 1 Replies
May 7, 2015
i have problem with radiobutton is in autopostback=true.
if i check rb1 page is refresh. after using update panel also i face the same problem in my code autopostback=true is compulsary beacause some controls open depending on this option..
View 1 Replies
May 7, 2015
i am try this code to open popup window popup window is open but page is reload
asp:DropDownList ID="ddlname" runat="server" CssClass="textbox2" AutoPostBack="True" OnSelectedIndexChanged="ddlname_SelectedIndexChanged"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="*" ControlToValidate="ddlname" Display="Dynamic" Font-Size="Larger" ForeColor="Red" ValidationGroup="addp" InitialValue="--Select--"></asp:RequiredFieldValidator>
protected void ddlname_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlname.SelectedValue == "New")
{
Response.Write("<script language='javascript'>window.open('AddSupplier.aspx','Popup','width=550,height=370,left=350,top=200,resizable=no')</script>");
}
i also use update panel then popup window cant open....
View 1 Replies
Jul 8, 2012
Session.RemoveAll();
Session.Abandon();
Response.ClearHeaders();
if (Session["name"] == null) {
Response.Redirect("login.aspx");
}
I have used this line for logout code , after getting logout i i tried pasting the URL in another tab it is showing
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 31: {
Line 32: con.Open();
Line 33: Label1.Text = Session["name"].ToString();
Line 34: string a = ("select name from user2 where name='" + Label1.Text + "'");
I don't want to show this error message, i want to reload the login page when Pasting URL or Back Button ..how can i do this?
View 1 Replies
Apr 8, 2010
I have a FormView at the very bottom of the page in insert/edit mode. When I click insert/update button, the whole page reload and the pointer does not keep within the Formview but go to the very top of the page far away from the desired FormView.
What can I do here to prevent cursor going outside the Formview ? Is it I can use update panel ? What and where I should use the tags ? Or there are other better way ?
View 2 Replies
Jan 10, 2011
I have a page that is based on my master page. the code below
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="CaseAdmin.aspx.cs" Inherits="Prototype4.CaseAdmin" %>
<%@PreviousPageType VirtualPath="~/Account/Login.aspx"%>[code]....
when the page above loads, i have link buttons on the left and an empty maincontent area next to its right. what i want to do is display an entry form in the main content on click event of the link button on the left. the second form is as below.(form not based on master page).
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OpenCase.aspx.cs" Inherits="Prototype4.EntryForms.OpenCase" %>
<%@PreviousPageType VirtualPath="~/CaseAdmin.aspx" %>[code]....
how do i perform this task and if i wanted to display a different form in place of the first one that appeared in the maincontent area, how do i go about it?
View 2 Replies
Jun 23, 2010
I am using a third party applet which enables a user to paste a screen shot into it and it posts the file data to an upload page. I am pretty new to asp.net (VB) and wondered if I could use a Generic Handler to read the post data and save the file to disk or just a normal web form to do this? All the examples I have received with the applet are in php of which i have had no experience coming from a Classic ASP background.
View 2 Replies
Aug 27, 2010
I am trying to get my head around the ASP timer control. What I am trying to achieve is to get a page to reload every 60 seconds but change the url querystring everytime between 3 values
i.e. scroll through
server/page.aspx?value=1
server/page.aspx?value=2
server/page.aspx?value=3
how I have though to do this is to use ASP code to grab the querystring value, and then create the next url. But I am having trouble passing that newly created url to a refresh control. im guessing HTML meta refresh is out of the question as I am using a variable. So from what I can see my option is to use the ASP timer control to count down (after the page has loaded) and after 60seconds load the next url.
View 7 Replies
Jun 3, 2010
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl='<%#Eval("Product_Path","~/Images\{0}") %>'
Height="70px" Width="70px" HeaderText="Product Image" OnClientClick="return OpenPopup() ;" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
<script type="text/javascript">
function OpenPopup()
{
window.open(' ','mywindow','width=700, height=800');
return false;
}
</script>
I jast wants to access the ImageUrl value inside the Javascript's function OpenPopup() to open a new window to This URL. All Codes are residing in Same Page.
View 3 Replies