What's the problem with this Ajax code?
The B.cfm:
<cfimport taglib="/tags" prefix="Tag">
<Tag:_ImportprocessingTime>
<!--- This tag show the time spended--->
do some long loop......
<!--- this only needs about 5 seconds--->
</Tag:_ImportprocessingTime>
the ajax code to execute the b.cfm:
function Importxls(url,buttonid,msgid,dbffilename)
createXMLHttpRequest();
var url=url+"?importdbffilename="+dbffilename+"&ti="+new
Date().getTime();
xmlHttp.open("GET",url,true);
xmlHttp.onreadystatechange= function()
if (xmlHttp.readyState < 4)
document.getElementById(msgid).innerHTML= "importing......";
document.getElementById(buttonid).disabled=true;
else if (xmlHttp.readyState == 4)
if(xmlHttp.status == 200)
document.getElementById(msgid).innerHTML=xmlHttp.responseText;
document.getElementById(buttonid).disabled=false;
else if (xmlHttp.status == 404)
document.getElementById(msgid).innerHTML="URL error";
document.getElementById(buttonid).disabled=false;
else
document.getElementById(msgid).innerHTML="error,xmlHttp
state:"+xmlHttp.status+"。";
document.getElementById(buttonid).disabled=false;
xmlHttp.send(null);
when I execute the b.cfm ,the spended time only about
5 seconds and show the result right now.
but when I execute the b.cfm through the ajax
code,after about 60 seconds,it shows the result,why?and how
to let it show the result after the b.cfm executed?
Thanks a lot.
up
Similar Messages
-
What is the problem with this simple code?
import javax.swing.*;
public class TestThread extends JApplet implements Runnable
JPanel jp;
JLabel jb;
public void init()
jp=new JPanel();
jb=new JLabel("Botton");
getContentPane().add(jp);
jp.add(jb);
public static void main(String args[])
new TestThread().start();
public void run()
System.out.println("Jaison");
Y it not working...help me
contd............
<html>
<head>
</head>
<applet
code=TestThread.class
width=1450
height=1680>
</applet>
</html>Status bar says
Applet TestThread StartedYou do know that main isn't used by applets? It will not be executed by the browser.
Kaj -
Please tell me what is the problem with this code
Hai,
Iam new to Swings. can any one tell what is the problem with this code. I cant see those controls on the frame. please give me the suggestions.
I got the frame ,but the controls are not.
this is the code:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class ex2 extends JFrame
JButton b1;
JLabel l1,l2;
JPanel p1,p2;
JTextField tf1;
JPasswordField tf2;
public ex2()
setDefaultCloseOperation(EXIT_ON_CLOSE);
setTitle("Another example");
setSize(500,500);
setVisible(true);
b1=new JButton(" ok ");
p1=new JPanel();
p1.setLayout(new GridLayout(2,2));
p2=new JPanel();
p2.setLayout(new BorderLayout());
l1=new JLabel("Name :");
l2=new JLabel("Password:");
tf1=new JTextField(15);
tf2=new JPasswordField(15);
Container con=getContentPane();
con.add(p1);
con.add(p2);
public static void createAndShowGUI()
ex2.setDefaultLookAndFeelDecorated(true);
public static void main(String ar[])
createAndShowGUI();
new ex2();
}import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class ex2 extends JFrame
JButton b1;
JLabel l1,l2;
JPanel p1,p2;
JTextField tf1;
JPasswordField tf2;
public ex2()
setDefaultCloseOperation(EXIT_ON_CLOSE);
setTitle("Another example");
b1=new JButton(" ok ");
p1=new JPanel();
p1.add(b1);
p2=new JPanel();
p2.setLayout(new GridLayout(2,2));
l1=new JLabel("Name :");
l2=new JLabel("Password:");
tf1=new JTextField(15);
tf2=new JPasswordField(15);
p2.add(l1);
p2.add(tf1);
p2.add(l2);
p2.add(tf2);
Container con=getContentPane();
con.add(p1, BorderLayout.NORTH);
con.add(p2, BorderLayout.CENTER);
pack();
setVisible(true);
public static void createAndShowGUI()
ex2.setDefaultLookAndFeelDecorated(true);
public static void main(String ar[])
createAndShowGUI();
new ex2();
} -
Vector, what is the problem with this code?
Vector, what is the problem with this code?
63 private java.util.Vector data=new Vector();
64 Vector aaaaa=new Vector();
65 data.addElement(aaaaa);
74 aaaaa.addElement(new String("Mary"));on compiling this code, the error is
TableDemo.java:65: <identifier> expected
data.addElement(aaaaa);
^
TableDemo.java:74: <identifier> expected
aaaaa.addElement(new String("Mary"));
^
TableDemo.java:65: package data does not exist
data.addElement(aaaaa);
^
TableDemo.java:74: package aaaaa does not exist
aaaaa.addElement(new String("Mary"));Friends i really got fed up with this code for more than half an hour.could anybody spot the problem?I can see many:
1. i assume your code snip is inside a method. a local variable can not be declare private.
2. if you didn't import java.util.* on top then you need to prefix package on All occurance of Vector.
3. String in java are constant and has literal syntax. "Mary" is sufficient in most of the time, unless you purposly want to call new String("Mary") on purpose. Read java.lang.String javadoc.
Here is a sample that would compile...:
public class QuickMain {
public static void main(String[] args) {
java.util.Vector data=new java.util.Vector();
java.util.Vector aaaaa=new java.util.Vector();
data.addElement(aaaaa);
aaaaa.addElement(new String("Mary"));
} -
HELLO
I was playing candy crush and I had too much problem with my bill your charge too much I want to know what is the problem with this game costTake it up with iTunes Support - we are not Apple here, we are just users like you:
http://www.apple.com/support/itunes/ww/
Cheers,
GB -
What is the problem with this Stored Procedure
Hi ,
What is the problem with this Stored Procedure ?Why is it giving errors ??
CREATE or replace PROCEDURE getEmpName
*(EMP_FIRST OUT VARCHAR2(255))*
BEGIN
SELECT ename INTO EMP_FIRST
FROM Emp
WHERE EMPNO = 7369;
END ;
*/*You don't specify precision in procedure arguments.
(EMP_FIRST OUT VARCHAR2(255))should be
(EMP_FIRST OUT VARCHAR2)Since you asked what's wrong with it, I could add that it needs formatting and the inconsistent use of upper and lower case is not helping readability. -
What is the problem with this code ? Race condition??
Guys,
The idea behind the attached code is quite simple.
I have a 2D parent array. First, I print a subset of this array into a table control (based on a sensor selection). Now, I want edit the numbers in the table. I need the changes to be reflected in the table and the parent 2D array. (In simple terms, this is like replacing the the edited array subset into the parent 2D array)
The problem is when I change(edit) any entry in the table, the entry changes back to its original value. The change doesnt seem to be reflecting on the parent 2D array and the table. .
Can anyone tell me where the problem is?
Thanks
Ravi
Solved!
Go to Solution.
Attachments:
Alarm threshold test.vi 14 KBI agree with Chris, here's an idea (of whatI think your code does):
The case structure in your code was unnecessary, all the cases were the same so I removed them.
The sequence structure was unnecessary.
Ton
Message Edited by TonP on 11-20-2008 07:52 PM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!
Attachments:
Alarm threshold test_BD.png 19 KB -
What is the problem with this Xcopy in PostBuild?
I am having the following post-build command in a Visual Studio project:
xcopy $(ProjectDir)Data $(OutDir)\
The Data is a directory in the project folder which I want to have copied to bin/debug or bin/release after build completes successfully.
I am getting an error as below:
The command "xcopy E:\Lavanya Deepak\Projects\matrimonial\Data bin\Debug\" exited with code 4.Why are you using Xcopy for something that Visual Studio can do already?
http://support.microsoft.com/kb/306234
http://msdn.microsoft.com/en-us/library/0c6xyb66%28v=vs.80%29.aspx
Besides, this is a issue with XCOPY, not with Visual C# or Visual Studio (wich this forum is about). Perhaps you better look into the documentation or ask in a admin Forum?
-1 for not an answer to the question.
This does not address the need for XCOPY. This is NOT an answer. How does this help transfer *.ascx files along with the compiled code behind into the respective directories of a local website for debugging. Umbraco requires this as an example.
Also, this could be an issue with Visual studio as the XCOPY works in VS 2012 and via the command prompt but NOT VS 2013 for me. -
Custom tables create in Apps schema ( What are the problems with this?)wwww
Hello all,
I'm a dba in a new environment where a number of custom schemas are being created in the apps schema. I know this is not considered Oracle's best practice and I would like to make some recommendations for a change. Before doing so, I would like to know the problems that are associated with custom tables living in the apps schema. We are currently on 11.5.10.2 on AIX. Also, if someone can point me to any "Official" customization standard or Oracle documention where I can backup my case it would be greatly appreciated.
Thanks in advance,Hi,
Please see this thread.
Custom application implemented in E-bussiness Suite
Re: Custom application implemented in E-bussiness Suite
Regards,
Hussein -
What's the problem with this CC stuff?
Since CC is available I only have trouble with all this stuff. I'm on OSX ML and there seems to be no change to install anything of the new stuff. CC app desktop- failed to install. When I use AAM, the CC apps are available, but after downloading I get an installation failure (15). I've tried anything discussed in this community, but nothing worked. So why there are so many problems with CC? Since I pay over 60 Euros each month, I would like to use the promised applications. ADOBE, please supply a reliable solution for all operating systems without the need of erase data, rename folders or anything else. Thanks in advance.
1hausl1 I would recommend you contact our support team and work with them directly. You can contact our chat support at http://adobe.ly/yxj0t6.
-
What is the problem with this script. it is giving invalid table name error
declare
l_cnt number;
v_sql varchar2(1000);
table_name1 varchar2(1000);
begin
for i in ( select table_name from all_tables )
loop
table_name1 := i.table_name;
v_sql := 'select count(1) from :table' ;
execute immediate v_sql into l_cnt using table_name1;
dbms_output.put_line(l_cnt);
end loop;
end;the problem is that you can't do that. it's illegal. use dynamic sql.
http://download-east.oracle.com/docs/cd/B10501_01/appdev.920/a96624/11_dynam.htm#10961
see a million other thread here, including this one posted 12 minutes before yours
Passing Parameter to From clause of SQL -
What is the problem with this trigger
please tell me why this trigger is not working , i tried to complile it but its giving the error!
the format is ...
create or replace trigger log_off
BEFORE LOGOFF ON database
begin
insert into log_trigg_table
values(user,sysdate,'LOGED ON');
END LOG_OFF;
and the error is
BEFORE LOGOFF ON database
ERROR at line 2:
ORA-04072: invalid trigger type
can you tell me the rreason
one this i forgot to tell you that i am using oracle 8.0.6
umair sattar
nullvalid trigger types are BEFORE/AFTER
INSERT/UPDATE/DELETE on TABLE -
What is the problem with this code?
dear sirs...
i have a page that does not contain any binding, it contains the following event:
public void onCheck(DataActionContext ctx)
ViewObject V=ctx.getBindingContext.findDataControl("AppModuleDataControl").getApplicationModule.findViewObject("empview1");
V.setWhereClause("");
V.executeQuery();
V.first();
note that the above code works if the table emp is on the page, however, if the page is not bound to the page (it does not contains the table) the statement in the bold will fire an exception saying that there is no binding. i am sure the V is not set to null.
another problem appears, if i put the table and execute it within jdeveloper, it works correctly, however, if i run if i deploy the application into application server, the code never runs as if there is some kind of an error.
i hope that you can anser me about the following;
1- if the code above correct?
2- how can i view the log for the application?
3- System.out.println("test"); in jdeveloper works okay, in the application server, does it cause some kind of an error?
thanks for any help & best regardsIf you don't close the ResultSet, different things happen based on which database you're running. You can keep read locks that you don't need. It wastes resources, and as different databases react differently to it, you might have weird bugs down the road that result from your practices of not properly closing ResultSets, PreparedStatements, and Connections. Put this in a loop like you've got here, and the effects may or may not get amplified.
I write a close() for a ResultSet just as soon as I open it, just to make sure I don't forget. In a situation like this one, I would write something like so:
for(int i = 0;i<someValue;i++)
try
//some code
rs = pstmt.executeQuery();
//some code that uses rs
catch(Exception e)
finally
if (rs != null)
rs.close();
if (pstmt != null)
pstmt.close();
} -
DECLARE
v_group_grade RECORDGROUP;
v_pop_group NUMBER;
BEGIN
v_group_grade := find_group('group_grade');
IF NOT id_null(v_group_grade) THEN
delete_group(v_group_grade);
END IF;
IF :CONTROL_LISTS.STAGE = 1 THEN
v_group_grade := create_group_from_query('group_grade', 'SELECT grade_name FROM grade WHERE grade_name LIKE ''KG%''');
v_pop_group := populate_group(v_group_grade);
populate_list('CONTROL_LISTS.GRADE', v_group_grade);
ELSIF :CONTROL_LISTS.STAGE = 2 THEN
v_group_grade := create_group_from_query('group_grade', 'SELECT grade_name FROM grade WHERE grade_name LIKE ''Prim%''');
v_pop_group := populate_group(v_group_grade);
populate_list('CONTROL_LISTS.GRADE', v_group_grade);
ELSIF:CONTROL_LISTS.STAGE = 3 THEN
v_group_grade := create_group_from_query('group_grade', 'SELECT grade_name FROM grade WHERE grade_name LIKE ''Prep%''');
v_pop_group := populate_group(v_group_grade);
populate_list('CONTROL_LISTS.GRADE', v_group_grade);
ELSE
NULL;
END IF;
END;
when I change the selection of the STAGE list in the runtime this error apear:
FRM-41334 invalid record group for list population.Thanks Faheem,
I got it it was in the select statement.
When I create poplist to fetch data from the database I should select at least two charachter columns. -
What is the problem with this table editor code?
im using JButton as TableCellEditor component. When I clicked on button nuthing happens.
Tell me where im wrong?
public class Abc extends AbstractCellEditor implements TableCellEditor{
private JButton btnSearch ;
private BCD ref;
private JTable table;
public DraggedTextSearchEditor(BCD o,JTable tab){
this.ref = o;
this.table = tab;
btnSearch = new JButton();
btnSearch.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
ref.search();
@Override
public Component getTableCellEditorComponent(JTable table,Object value
,boolean isSelected,int row,int col)
return btnSearch;
public Object getCellEditorValue(){
return btnSearch;
// public Object getCellEditorValue(){
// return null;
}You're trying to be too tricky: dynamically linking to an Action Listener. When you compile the object ref = null and later you assign it to your dragged object--Nope, not going to work in the way you think it does. At the time of compile your ref object is null.
Maybe you are looking for
-
ERROR: exception symbol "09732" not found in resource file
I am trying to get a client to work with workflow services. I get 'ERROR: exception symbol "09732" not found in resource file' in the output when the method queryTasks is excecuted. Jdeveloper 10.1.3.4 and SOA Suite 10.1.3.3.0 Any ideas? Eydun ------
-
WRT54GS V7 Firmware version?
Hi all! I've recently bought a WRT54GS V7 cable router/access point. Now, given the problems I've had with previous devices, I'd like to make sure that the firmware is completely up-to-date. However, when I go to the Linksys UK website, and find the
-
How do I remove a favicon once set and replace with a new one?
I want to replace an existing favicon with a new one and it won't allow me. does anyone have a work around?
-
LEAVE_PDFOWNERSHIP=YES - Acrobat long delay in IE8
Hi All, I need to set AdobeAcrobat as the default program in browser(IE), therefor I was using Adobe Property "LEAVE_PDFOWNERSHIP" as follows: msiexec /i AdbeRdr1010_de_DE.msi LEAVE_PDFOWNERSHIP=YES /qb! It was working perfectly fine with previous up
-
I accidentally hit "remember password". I want to undo that.