ShowDocument not working --- Beginner
hi all,
I try to open a new Browser by clicking on a menuItem in a popup menu.
I used the showDocument command , it does not raize any exception but it does not work, now new windows opened.
this is my code:
public void actionPerformed(ActionEvent actionevent)
try
myConfig.getAppletContext().showDocument(new URL("http://localhost/main/streamer_links.buy?u_sess=1&symbol=AICR"), "Buy");
catch(MalformedURLException malformedurlexception)
System.out.println(malformedurlexception);
any help ???
How are you running the applet. If you are using an
appletviewer to view the applet, the show document
wont work. It'll work when you use the applet in a
browser.
This is because, the showDocument() is understood by
the console and it acts accordingly. The AppletViewer
cannot show you html files, so it dosent work there,
but the browser (say ie) can SHOW the document and so
it does...
Get Your Java Apps Rated: http://www.thejavahub.com
I run the applet using JDeveloper 9.0.4.
But realy after trying to run it using (IE) it works correctly.
Thank you for ur help.
Similar Messages
-
Import package does not work - beginner help
Hi, I'm a beginner with java. I just trying to figure out how to use packages. I followed everything in the tutorial, but I can't figure out why my simple example does not work.
I made the following directories three, for the sake of the example.
in /home/username/Desktop I created a directory named it
inside it I created prove
inside prove I created test1 and test2
Inside test1 I created the following sample class:
package it.prove.test1;
public class HelloWorld
private String message;
public HelloWorld(String message)
this.message = message;
public String getMessage()
return this.message;
}in the directory test2 I created this other one:
package it.prove.test2;
import it.prove.test1.HelloWorld;
public class HelloWorldProgram
public static void main(String[] args)
HelloWorld hw = new HelloWorld("Guten Tag, Welt!");
System.out.println(hw.getMessage());
}So now I have this three:
it
it/prove
it/prove/test1, it/prove/test2
As I said in test1 there is HelloWorld.java and in test2 HelloWorldProgram.java.
When I compile HelloWorld.java, it worked fine.
When I try to compile HelloWorldProgram.java, the compiler says that cannot find package it.prove.test1..
Why that? What did I make wrong?
Sorry both for my bad english (it is not my first language) and for the really trivial question (I'm a really beginner).
Tnx to whoever will helpAssuming you are running on Windows here.
Packages are directly tied to the classpath. Before java can find the it.prove.test1 package, it needs to be a part of the classpath. To make this possible, you need to add the root of the path, where the 'it' directory is in, to the classpath, like this:
javac -cp .;/home/username/Desktop file.java
the -cp switch tells java which classpath to use; it consists of two elements:
. = current directory
/home/username/Desktop = the directory containing the 'it' package root
When run like this, it should work. The same goes for running the code, you would run it like this:
java -cp .;/home/username/Desktop it.prove.test2.HelloWorldProgram
Hope that gives you the hints you need. -
Applet showDocument() not working properly.
I'm having some problems with the showDocument(). Sometimes it works and sometimes it doesn't. It is very inconsistent and i can't seem to find the bug that is causing it. I would need to call the showDocument() function a few times (i added a refresh button calling the showDocument()) before it will finally show. The number of times i have to refresh is also not consistent.
Please help, thanks :)Did you get this resolved..
I am using Internet Explorer v. 5.2 on Mac OS X v.10.2.8. I have successfully run an applet, using jre 1.3.1 which implements the "showDocument" method and opens a new page.
Could you post your code.. -
ShowDocument not working with Host name in IE
I have the following applet code:
try
URL NodeURL = selectedNode.getNodeURL();
if (NodeURL != null)
String pageName = selectedNode.getNodeURLTarget();
getAppletContext().showDocument(NodeURL,pageName);
} catch (Exception e)
System.out.println("6.mousePressed Execept = ");
e.printStackTrace(); // fps '04 uncommented
Html page.
<html>
<head>
<title>Module Home Page</title>
</head>
<frameset cols="33%,*">
<frame src="http://11.2.2.125/java/WebViewTree.html" name="treedisplay" marginwidth=0 marginheight=0>
<frame src="GenInfo.html" name="pagedisplay" marginwidth=5 marginheight=5>
</frameset>
</html>
When I bring up my webpage via IP(http://11.2.2.125) everything is ok. If I use the host name (http://davehost) the page does not get displayed in the frame named 'pagedisplay'.
Now this only happes with IE (6.0 sp2) it works with Netscape.
I notice the following:
If I change the code to use getAppletContext().showDocument(NodeURL,'_blank'); it actually pops up a new window and works ok.
I noticed that the browser never sends the 'GET' when executing the showDocument.
Any one notice this or notice someting I am doing wrong.
Thanks,
FrankHard coding the ip is not a good practice more over try using the relative path
such a ..\ for directory..
and i believe that the ip need not be specified when you are deploying it on web server. -
Applet showDocument not working for local files!!
Hello:
I wrote a signed applet that is generates html files in user temp folder (for my Win 7: C:\Users\ren\AppData\Local\Temp\jTmp\ )
The applet is supposed to display the html files in browser by using showDocument().
I tested it on firefox 25 and IE9 enabling pop-up windows
However, it does nothing. Not even an exception.
The applet fails when running from web (but works in c:\)
For the case, it happens the same with oracle's sample: Displaying Documents in the Browser (The Java&trade; Tutorials &gt; Deployment &gt; Java …
In this applet, if you input a local file (file:///c:/ etc) , it won't open it.
I supposed showDocument was not subject to security restrictions, but seems the new rule is:
-applets running locally will display all pages (web/local)
-applets running from the web will display only web pages.
My applet used to work fine, but in some jre7 upgrade it was broken!!
Is this a bug or a new security issue?
Thanks in advance!Did you get this resolved..
I am using Internet Explorer v. 5.2 on Mac OS X v.10.2.8. I have successfully run an applet, using jre 1.3.1 which implements the "showDocument" method and opens a new page.
Could you post your code.. -
EntityManager is not null then what can be the problem?findAll not working
Hello,
I am just a beginner trying to learn JPA. I successfully added record to database but when i tried to display it it throws me null pointer exception. This is the code
index.xhtml
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<title>Facelet Title</title>
</h:head>
<h:body>
<h:form>
<h:outputLabel value="Username :"/>
<h:inputText value="#{IndexManagedBean.userName}"/> <br />
<h:outputLabel value="Password :"/>
<h:inputText value="#{IndexManagedBean.password}"/> <br />
<h:outputLabel value="Birthdate :"/>
<h:inputText value="#{IndexManagedBean.birthdate}">
<f:convertDateTime dateStyle="medium" type="date"/>
</h:inputText> <br />
<h:commandButton value="Add User" actionListener="#{IndexManagedBean.addUser}"/>
<br />
<br/>
</h:form>
</h:body>
</html>Users.java My Entity bean
* To change this template, choose Tools | Templates
* and open the template in the editor.
package BusinessFacade;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@Entity
@Table(name = "tblusers", catalog = "ssms", schema = "")
@NamedQueries({
@NamedQuery(name = "Users.findAll", query = "SELECT u FROM Users u"),
@NamedQuery(name = "Users.findByUserId", query = "SELECT u FROM Users u WHERE u.userId = :userId"),
@NamedQuery(name = "Users.findByUserName", query = "SELECT u FROM Users u WHERE u.userName = :userName"),
@NamedQuery(name = "Users.findByPassword", query = "SELECT u FROM Users u WHERE u.password = :password"),
@NamedQuery(name = "Users.findByLastLoginDateTime", query = "SELECT u FROM Users u WHERE u.lastLoginDateTime = :lastLoginDateTime"),
@NamedQuery(name = "Users.findByBirthdate", query = "SELECT u FROM Users u WHERE u.birthdate = :birthdate")})
public class Users implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "UserId", nullable = false)
private Integer userId;
@Basic(optional = false)
@Column(name = "UserName", nullable = false, length = 50)
private String userName;
@Basic(optional = false)
@Column(name = "Password", nullable = false, length = 50)
private String password;
@Basic(optional = false)
@Column(name = "LastLoginDateTime", nullable = false)
@Temporal(TemporalType.TIMESTAMP)
private Date lastLoginDateTime;
@Column(name = "Birthdate")
@Temporal(TemporalType.TIMESTAMP)
private Date birthdate;
public Users() {
public Users(Integer userId) {
this.userId = userId;
public Users(String userName, String password, Date birthDate) {
this.userName = userName;
this.password = password;
this.lastLoginDateTime = new Date();
this.birthdate = birthDate;
public Integer getUserId() {
return userId;
public void setUserId(Integer userId) {
this.userId = userId;
public String getUserName() {
return userName;
public void setUserName(String userName) {
this.userName = userName;
public String getPassword() {
return password;
public void setPassword(String password) {
this.password = password;
public Date getLastLoginDateTime() {
return lastLoginDateTime;
public void setLastLoginDateTime(Date lastLoginDateTime) {
this.lastLoginDateTime = lastLoginDateTime;
public Date getBirthdate() {
return birthdate;
public void setBirthdate(Date birthdate) {
this.birthdate = birthdate;
@Override
public int hashCode() {
int hash = 0;
hash += (userId != null ? userId.hashCode() : 0);
return hash;
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Users)) {
return false;
Users other = (Users) object;
if ((this.userId == null && other.userId != null) || (this.userId != null && !this.userId.equals(other.userId))) {
return false;
return true;
@Override
public String toString() {
return "BusinessFacade.Users[userId=" + userId + "]";
}UsersFacade.java my Stateless session bean
package BusinessFacade;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;
@Stateless
public class UsersFacade {
@PersistenceContext(unitName = "FirstJpaExamplePU")
private EntityManager em;
public void create(Users users) {
em.persist(users);
public void edit(Users users) {
em.merge(users);
public void remove(Users users) {
em.remove(em.merge(users));
public Users find(Object id) {
return em.find(Users.class, id);
public List<Users> findAll() {
return em.createNamedQuery("Users.findAll").getResultList();
public List<Users> findRange(int[] range) {
CriteriaQuery cq = em.getCriteriaBuilder().createQuery();
cq.select(cq.from(Users.class));
Query q = em.createQuery(cq);
q.setMaxResults(range[1] - range[0]);
q.setFirstResult(range[0]);
return q.getResultList();
public int count() {
CriteriaQuery cq = em.getCriteriaBuilder().createQuery();
Root<Users> rt = cq.from(Users.class);
cq.select(em.getCriteriaBuilder().count(rt));
Query q = em.createQuery(cq);
return ((Long) q.getSingleResult()).intValue();
}If entitymanager is null then even create should not work, but here findall is not working, create is working perfect!oops, sorry about that!
here is stack trace :
com.sun.faces.mgbean.ManagedBeanCreationException: Cant instantiate class: IndexManagedBean.
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:193)
at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:102)
at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:405)
at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:267)
at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:86)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:99)
at com.sun.el.parser.AstValue.getValue(AstValue.java:158)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:219)
at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:102)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:190)
at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:178)
at javax.faces.component.UIOutput.getValue(UIOutput.java:168)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:338)
at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:878)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1620)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:848)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1613)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1616)
at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:380)
at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:126)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:127)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:332)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:233)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at BusinessFacade.UsersFacade.findAll(UsersFacade.java:47)
at IndexManagedBean.<init>(IndexManagedBean.java:23)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:188)
... 53 moreEventually, i found out the EntityManager is null! But how can it be null. I created a persistence context and gave it proper name in code. Then how it be null? -
LD_ASSUME_KERNEL does not work in recent distros. How to avoid?
LD_ASSUME_KERNEL=2.4.XX does not work in all recent distros.
$ export LD_ASSUME_KERNEL=2.4.20
$ ls
ls: error while loading shared libraries: librt.so.1: cannot open shared object
EBS contains very old cmponents like MWA wich not compiled without this setting. How to avoid errors?You can unset LD_ASSUME_KERNEL and EBS 11i (11.5.9 and 11.5.10) will work fine on 2.6.16 kernels (SLES-10 and RH 5.0).
The following instructions should get you going:
1) Setup the environment as you would for running Applications on RH 4 or SLES9
I.E. follow Oracle Applications Installation Update Notes, Release 11i (11.5.10.2)
http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=316806.1
2) Remove any LD_ASSUME_KERNEL references in O/S /etc/profile.d files
3) Comment out LD_ASSUME_KERNEL entries in $ORACLE_HOME/appsutil/bin/adgetlnxver.sh and $AD_TOP/bin/adgetlnxver.sh
if [ ${setflag}x = "x" -a $os = "Suse" ]; then
# LD_ASSUME_KERNEL="2.4.21"
# export LD_ASSUME_KERNEL
os="Suse"
fi
if [ ${setflag}x = "x" -a $os = "RH" ]; then
# LD_ASSUME_KERNEL="2.4.19"
# export LD_ASSUME_KERNEL
os = "RH"
fi
If doing a rapid install, the database startup will fail and rapidwiz will prompt to ignore or retry. At this point, edit $ORACLE_HOME/appsutil/bin/adgetlnxver.sh as shown above and click on retry. It will then run to the autoconfig step at the end and error out. Just hit cancel, edit $AD_TOP/bin/adgetlnxver.sh and run autoconfig.
On Suse, one needs compat-gdbm for libgdbm.so.2
rpm -Uhv compat-gdbm-1.8.0-7.i586.rpm
Preparing... ########################################### [100%]
1:compat-gdbm ########################################### [100%]
Also in /usr/lib run ln -s libdb.so.2 libdb.so.3
Ref:
Note:300807.1 for Suse
create symbolic link called libdb.so.2 pointing to libdb.so.3, as follows:
$ cd /usr/lib
$ ln -s libdb.so.3 libdb.so.2 (or install db1-1.85-85.1 which does the same)
Note:294043.1 for Red Hat
As per an internal Bug 4045349, this is an issue with O/S side installation of compat-db rpm.
libdb.so.3 gets installed when compat-db rpm is installed.
- The O/S installation CD would contain compat-db
e.g compat-db-4.1.25-6.i386.rpm ( may change as per your version ).
- Manually install the compat-db rpm
e..g "rpm -ivh compat-db-4.1.25-6.i386.rpm"
OR
Note:345172.1
A library is missing: libdb.so.2 is from gnome-libs-1.4.1.2.90-34.1.i386.
This error also occurs in SLES9, same cause, slightly different resolution. SLES9 comes with libdb.so.3 and libdb.so.4 but not libdb.so.2 - need to install db1-1.85-85.1 to get libdb.so.2.
4) In order to relink cplex library executables (MSC, MSO, MSR, MST, WIP, etc), edit $AD_TOP/bin/adrelinknew.sh and add the following LD option (-Wl,--noinhibit-exec) in the LINUX section:
LINUX)
LDFLAGS='-s -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs -ldl'
DEBUG_LDFLAGS='-g -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs -ldl'
exe_line='ELF .*executable'
SHRLIB_LD='gcc'
LD='gcc'
SHRLIB_LDFLAGS='-L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs -shared'
if test -f "/etc/redhat-release"; then
CPP_LIBS='/usr/lib/libstdc++-2-libc6.1-1-2.9.0.so'
elif test -f "/etc/SuSE-release"; then
CPP_LIBS='/usr/lib/libstdc++.so.2.9'
else
CPP_LIBS=''
fi
CPP='g++'
CPP_LDFLAGS='-s -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs
set CPP_LDFLAGS='-s -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs
to CPP_LDFLAGS='-s -L$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib/stubs -Wl,--noinhibit-exec'
After this chance, you can apply any MRP, ASCP patch and all executables will relink correctly. You can also use adadmin to relink all executables and it completes without error.
5) Discoverer 4.1.38.08 Follow Metalink Note 280598.1 Discoverer 4i On Linux: Required Patch and Configuration for Discoverer Server Stability to use JDK 1.3.1 and oadj. I updated the autoconfig template files with this change after applying 3895177. Discoverer viewer and plus standard BIS reports all open correctly on SLES-10 -
Hello this is my first post on cisco support and hope I can get some help. I recently purchased the book CISCO CCENT / CCNA ICND1 by wendell odom and when I used the CD to install the Pearson Practice exams, it does not work. I tried everything! It even asks for a activation code, which on the CD It says "Refer to the Activation Code Included in the DVD Sleeve when Registering Pearson IT Certification Practice Test Software"I don't see anything related to a Activation Code anywhere on the CD OR on the sleeve! So now I can't use that.
The Network simulator Wendell odom uses in his videos is already outdated it seems and I can't get mine to work. Why? Because I bought this book in hopes of this being a beginner book and praying the person won't skip information to actually set up the book. So now the videos are useless because I can't connect because I have no idea how...
The Network Simulator lite, wow 3/3 When giving me software to use. The Prompt command does not work, Only the enter key will work but when I try to put in a password I can't hit anything else but enter.
I hope I can get help from a more official member as to seeing how I bought this book and I can read but whats really the point if I don't have the hands on training?Keunepete,
When I ordered my books for the ICND1 and ICND2, they came with a CD in the back pocket (sleeve) of the book. Along with the CD was a thick piece of paper that had the activation code on it. It was a white, square piece of paper with big black print on it. Did you buy your book used? Was the CD sealed in the back pocket?
-Zach -
Javascript For loop not working within a function
Hi all,
I'm a beginner to LiveCycle and I cant seem to get a loop working within a function. The function is being called successfully because when I manually create the code it works but I am trying to clean things up.
So here is my working example:
function hideContent() {
MainFlowedSub.LevelsSub.Table1.presence = "hidden";
MainFlowedSub.LevelsSub.Table2.presence = "hidden";
... and so on....
MainFlowedSub.LevelsSub.Table8.Row1.presence = "hidden";
MainFlowedSub.LevelsSub.Table8.Row2.presence = "hidden";
... and so on....
However when I try and creat a loop instead of listing every sing table/row nothing happens. this is important to my project as there will be alot of different rows depending on radio button selections earlier in the form. Below is the current state of my code:
function hideContent() {
var i=0;
for (i=1;i<=5;i++)
MainFlowedSub.LevelsSub.Table[i].presence = "hidden";
var j=0;
for (j=1;j<=23;j++)
MainFlowedSub.LevelsSub.Table8.Row[j].presence = "hidden";
var k=0;
for (k=24;k<=88;k++)
MainFlowedSub.LevelsSub.Table8.Row[k].presence = "hidden";
this will then continue as there will be hundreds of rows.
Any help will be greatly appreciated and I am sure I am making a basic error so thanks in advance.
jthanks for your help paul. Again, really appreciated as I know very little about all this.
Unfortunately its still not working... One thing I am sure of is that I am doing something very basic wrong. So here is my code, I have applied your suggestion above which will cover all my data:
To give an understanding, I have 5 tables of content, each has i amount of rows. and I am running this script to clear/remove all items being displayed.
function hideContent() {
for (var i=1;i<=5;i++)
xfa.resolveNode("MainFlowedSub.LevelsSub.Table[" + i + "]").presence = "hidden";
for (var i=1;i<=71;i++)
xfa.resolveNode("MainFlowedSub.LevelsSub.Table8.Row[" + i + "]").presence = "hidden";
for (var i=1;i<=93;i++)
xfa.resolveNode("MainFlowedSub.LevelsSub.Table9.Row[" + i + "]").presence = "hidden";
for (var i=1;i<=99;i++)
xfa.resolveNode("MainFlowedSub.LevelsSub.Table10.Row[" + i + "]").presence = "hidden";
for (var i=1;i<=101;i++)
xfa.resolveNode("MainFlowedSub.LevelsSub.Table11.Row[" + i + "]").presence = "hidden";
for (var i=1;i<=87;i++)
xfa.resolveNode("MainFlowedSub.LevelsSub.Table12.Row[" + i + "]").presence = "hidden";
It has to be something to do with my For loops because if I manually insert each line it works perfectly.
Thanks again,
johnny -
AddChild Not working in a loop with custom component
Hi,
I have a custom component 'form component'
<?xml version="1.0" encoding="utf-8"?>
<mx:Form xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import flash.net.navigateToURL;
public var documentName:String;
public var documentLocation:String;
public var documentDescription:String;
public var documentLevel:String;
private function openLink():void
var urlRequest:URLRequest=new URLRequest(documentLocation);
navigateToURL(urlRequest,"_blank");
]]>
</mx:Script>
<mx:FormItem width="100%" height="100%" paddingRight="10" borderThickness="10">
<mx:VBox width="100%" cornerRadius="10" borderThickness="2" borderStyle="solid" borderColor="#D5D2D2">
<mx:ApplicationControlBar width="100%" fillAlphas="[1.0, 0.52]" fillColors="[#FFFFFF, #B3CDD9]">
<mx:LinkButton id="eachDocumentName" label="Name" click="openLink()" textAlign="left" width="50%" />
<mx:Label id="eachDocumentLevel" text="Level" textAlign="right" width="50%"/>
</mx:ApplicationControlBar>
<mx:Label id="eachDocumentDescription" width="100%" text="Description" paddingTop="5" paddingLeft="10"/>
<mx:Label height="10" width="100%" />
</mx:VBox>
</mx:FormItem>
</mx:Form>
and I Want to add this component inside a VBox for a loop dynamically like
Script Code:
private function showDocuments(event:ResultEvent):void
var documentList:ArrayCollection=event.result.root.documents.document;
for(var i:int=0;i<documentList.length;i++)
var documentName:String=documentList[i].name.toString();
var documentDescription:String=documentList[i].description.toString();
var documentLevel:String=documentList[i].level.toString();
var documentLocation:String=documentList[i].location.toString();
createChildForFilePanel(documentName,documentLevel,documentDescription,documentLocation);
private function createChildForFilePanel(documentName:String,documentLevel:String,documentDescription:Stri ng,documentLocation:String):void
Alert.show("function Called");
var documentListing:DocumentListing=new DocumentListing();
documentListing.percentWidth=100;
documentListing.percentHeight=100;
documentListing.eachDocumentName.label=documentName;
documentListing.eachDocumentLevel.text=documentLevel;
documentListing.eachDocumentDescription.text=documentDescription;
documentListing.documentLocation=documentLocation;
filePanel.addChild(documentListing);
MX: code
<mx:VBox id="filePanel" label="File Content" width="100%" height="100%" borderThickness="0" >
</mx:VBox>
This is actually Not working.. Am I doing anything wrong. I have included the component in the namespace..
Thanks In Advance,
PiyushIts working now. The Solution to it what I found was whatever you are Adding To the Parent Component. The Parent Component should be created in the action script.
Worked for me :-)
Thanks,
Piyush -
Preview program in Maverik - Spacebar not working to move image
was just forced by a program to upgrade to Maverik -- when i use PREVIEW to view images spacebar is not working in order to move the image around in the open window with the mouse to see other parts of edits etc? Bug? Just a box draws or what is the new command.. i cannot get to parts of images blow up to see what i need to see now other than opening in photoshop
thxIs this an HTML file? Or something else?
Nancy Gill
Adobe Community Expert
Author: Dreamweaver 8 e-book for the DMX Zone
Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
2003)
Technical Editor: DMX 2004: The Complete Reference, DMX 2004:
A Beginner''s
Guide, Mastering Macromedia Contribute
Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
Web Development
"VirtualKelly" <[email protected]> wrote in
message
news:f2b42f$m2l$[email protected]..
> Whenever I click on preview in browser - IE, it doesn't
work. I've tried
> pasting the link into IE, but it gives me the prompt to
open/save/cancel.
> When
> I click open, it goes back to DW window. This is the
only browser I am
> having
> difficulty with.
>
> I have only had the program loaded since Saturday and it
worked
> sporadically
> then, but now, nothing.
>
> I haven't had any IE updates or window updates.
>
> Regards.
> -
PHP email form with Validation - not working
Hello;
I am new to using php. I usually use coldfusion or asp but this site requires me to write in php. I have a form I am trying to get to work and right now.. it doesn't do anyhting but remember what you put in the fields. It doesn't want to send, and it won't execute the validation script for the fields that are required. Can anyone help me make this work? I'm confused and a definate newbie to PHP.
Here is my code:
<?php
$PHP_SELF = $_SERVER['PHP_SELF'];
$errName = "";
$errEmail = "";
$errPhone = "";
if(isset($_POST['submit'])) {
if($_POST["ac"]=="login"){
$FORMOK = TRUE; // $FORMOK acts as a flag. If you enter any of the conditionals below, // it gets set to FALSE, and the e-mail will not be sent.
// First Name
if(preg_match("/^[a-zA-Z -]+$/", $_POST["name"]) === 0) {
$errName = '<div class="errtext">Please enter you name.</div>';
$FORMOK = FALSE;
// Email
if(preg_match("/^[a-zA-Z]\w+(\.\w+)*\@\w+(\.[0-9a-zA-Z]+)*\.[a-zA-Z]{2,4}$/", $_POST["email"]) === 0) { $errEmail = '<div class="errtext">Please enter a valid email.</div>';
$FORMOK = FALSE;
// Phone
if(preg_match("/^[a-zA-Z -]+$/", $_POST["phone"]) === 0) {
$errPhone = '<div class="errtext">Please enter your phone number.</div>';
$FORMOK = FALSE;
if($FORMOK) {
$to = "[email protected]";
$subject = "my. - Contact Form";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$phone_field = $_POST['phone'];
$city_field = $_POST['city'];
$state_field = $_POST['state'];
$message = $_POST['comment'];
$message = "
Name: $name_field
Email: $email_field
Phone: $phone_field
City: $city_field
State: $state_field
Message: $message";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// Additional headers
$headers .= 'To: <[email protected]>' . "\r\n";
$headers .= '[From] <$email_field>' . "\r\n";
// Mail it
mail($to, $subject, $message, $headers);
header("Location: thankyou.php")
// I have no idea what these next 3 lines are for. You may just want to get rid of them.
ini_set("sendmail_from","[Send from]");
ini_set("SMTP","[mail server]");
mail($to, $subject, $message, $headers);
} else {
echo "Error!";
?>
<form method="post" action="<?php $PHP_SELF ?>" id="commentForm">
<input name="name" size="40" value="<?php echo $_POST["name"]; ?>" type="text">
<?php if(isset($errName)) echo $errName; ?>
<input name="email" size="40" value="<?php echo $_POST["email"]; ?>" type="text">
<?php if(isset($errEmail)) echo $errEmail; ?>
<input name="phone" size="40" value="<?php echo $_POST["phone"]; ?>" type="text" id="phone">
<?php if(isset($errPhone)) echo $errPhone; ?>
<input name="city" size="40" value="<?php echo $_POST["city"]; ?>" type="text" id="city">
<input name="state" size="40" value="<?php echo $_POST["state"]; ?>" type="text" id="state">
<textarea name="comment" cols="30" rows="10" id="comment"><?php echo $_POST["comment"]; ?></textarea>
<input type="submit" value="Submit" name="submit" class="contact-submit" />
</form>
It seems pretty simple.. but it's not working at all. I would also like this page to submit to it's self, and when it actually does send an email, to just make the form disappear and replace it with the thank you text instead of sending you to another page. I also do not need to use an smtp server, it goes directly to the network server when sent.
I'm really sorry to ask all of this, I'm trying to learn this language and need to make this work.
Thank you for anyones help in advance..oO(BarryGBrown)
> I have a php file which generates an email from a form
in a website I have
>designed. I just want to make some areas of the final
generated email in bold
>text. I know if people have plain text only selected in
their email client they
>won't see the bold text, but at least it will reach a
certain percentage of
>users.
You can't do bold text in a normal email. Plain text is just
that -
plain text. For anything more you need HTML. _If_ you should
need it.
Usually plain text serves pretty well and is the most
efficient way.
> the line in question is -
>
> $body ="Booking request details from website:\n\n";
>
> I have tried putting and ,
syntax is used in some forum software, but besides that it
has
no meaning whatsoever.
>inside the inverted commas, outside
>etc, plus tried different declarations within the
<head>, nothing works! What
>am I doing wrong?
You would have to create an entire HTML email with all the
required
headers and boundaries. Quite difficult to do by hand with
PHP's mail()
function.
> I am a beginner with this php stuff, please be kind!
Then you should start simple with plain text. There are some
classes out
there which make it easy to generate text and HTML emails
(phpmailer for
example), but you should be familiar with PHP coding if you
want to use
them.
Micha -
MSR 2.0 Mobile Sales R/3 Synchronization do not work properly
Hi to all there,
we want to use the MSR 2.0 scenario with MI 2.1 SP03 Patch 06. Unfortunately the synchronization with the
client do not work.
We made some settings in TCO MSR_SELECT on the R/3
backend system. The corresponding data reached the
table merep_207 on the web application server. If we
do the synchronization not all data appear on the client
site. For example no sales order reached the client.
Can anybody help regarding this problem?
Thanks in advance!Hi Jill,
thank you very much for answering...
I worked through the trouble shooting guide, but I
can't solve the problem.
Can you give me some advice how to reset the
client database (both on WAS and on the client) in order to start again at the beginning?
I resetted the RDB tables already with the FB MEREP_RDB_T01_RESET and now no entries in the merep_mon
existing, when I execute the synchronization today.
You see, I am a absolute beginner...
Thanks for your help..
Best regards,
Marion -
[RTM] Aero Peek not available or not working
hello, I have Ultimate Final from my MSDN subscription installed. First I installed it on a notebook (C2D, Nvidia 9600GS) and got to see Aero and it's features. Especially: Aero Peek.
Now I have it also installed on my Desktop - a much more powerfull PC (3GHz 4 core, Nvidia 8800GT). Aero Performance Index is 6.9. I have choosen an aero theme and Aero is basically working (transparency, snapping etc.). What is not working is Peek :( That means: I hover the mouse over the "Show Desktop" on the taskbar but get no transparent windows. I hover the mouse over a window preview on the taskbar but do not get the "show this window and make all others transparent".
And what's weird: The setting in the Taskbar properties is checked but grayed out/readonly. Also, in the context menu on the "Show Desktop" Button in the taskbar, the "Preview Desktop" entry is checked but grayed out/readonly.
In short: Desktop Preview (Peek) is "Enabled" but not working and I cannot change the setting.
What could be the reason for this?
Desktop machine is a dual screen setup. I disabled one screen but this made no difference. I switched between various themes but still no difference. I found a hint to a registry key, something in the line of "desktopPreviewDisabled" and it is set to "0" (=enabled as all the checkboxes indicate). I did set it to 1 and back to 0 - no difference.
Help pleaseUpdate: Peek does work with a second (the admin) user that has still all default settings.
With my normal user account I played around a lot to make it fit my needs. Now I really wonder which change caused Peek to not work anymore?
my aero peek was greyed out, I tweaked with theme fonts and a few theme settings then checked aero peek, It was ticked and UNTICKABLE it works now, lol haha create a new profile gimme a break geta clue, besides reg fixes abound for these greyed out
type of instances its always fixable one way or another, specially with a reg script to change the greyed out to usable tickable option once again, anyway safemode it if you have to and get your windows aero peek back peace out and stop blabbing about creating
a new profile for this troublesome greyed out aeropeek good lord you guys some of ya are far too extreme and way off base and troubleshooting resoultions to mundane issues... peace out njoy your pc time get multimedia tool heaven ...<<< www.mowtools.ourtoolbar.com
from novice beginner way up to xtreme pc elit power hungry users will find all the multimedia on and offline apps in this fine toolbar lifesavers get it while its f free peace out!
Long time WinXP user, skipped Vista and starting to like 7
Hi
Try the Aero troubleshooter.
Open Control Panel/Troubleshooting.
Under Appearance and Personalization, select the Display Aero desktop effects.
In the Troubleshooter dialog, click the Advanced link and place a
check mark in the Apply Repairs Automatically option.
Click Next to run the troubleshooter.
Let us know the results.
Thank You for testing Windows 7
Ronnie Vernon MVP -
Command-delete, command-left and command-right not working as expected
On a Mac (in my case OS X 10.6.8) when entering text into a text-field or text-box 'command-delete' in any other application deletes everything between the cursor and the beginning of the current line. I'm using Firefox 10.0.1 and this does not work.
Also, in certain rich text editors such as Gmail's compose mail text-box 'command-left' and 'command-right' which would usually jump to the respective beginning or end of the current line doesn't seem to work.Try:
Create Table ImportLog
( recid int,
grouploadid int,
groupid int,
tablename varchar(128),
note varchar(500)
Insert Into ImportLog
Values
(1,216,1,'tableb','noteb'),
(2,217,1,'tablea','notea'),
(3,217,2,'tableb','noteb'),
(4,217,1,'tablea','notea'),
(5,230,1,'tableb','noteb'),
(6,244,1,'tablea','notea'),
(7,244,2,'tableb','noteb'),
(8,244,3,'tablec','notec'),
(9,217,3,'tabled','noted')
select r1.RecID, r1.GroupLoadID, r1.groupid, r1.tablename, r1.note,
r2.RecID, r2.GroupLoadID, r2.groupid, r2.tablename, r2.note
from ImportLog r1
full join
(select RecID, GroupLoadID, groupid, tablename, note
from ImportLog
where GroupLoadID = '217'
) r2
on r1.TableName = r2.TableName and r1.Note = r2.Note and r1.Groupid = r2.Groupid
where r1.GroupLoadID = '244'
order by 1
GO
DROP Table ImportLog
GO
RecID GroupLoadID groupid tablename note RecID GroupLoadID groupid tablename note
6 244 1 tablea notea 2 217 1 tablea notea
6 244 1 tablea notea 4 217 1 tablea notea
7 244 2 tableb noteb 3 217 2 tableb noteb
8 244 3 tablec notec NULL NULL NULL NULL NULL
Kalman Toth Database & OLAP Architect
SQL Server 2014 Database Design
New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014
Maybe you are looking for
-
How can i see my apps on apps tab in itunes when i connect my iphone to my laptop?
i want to see my apps backed up on my apps tab in itunes when i connect my iphone to my laptop
-
CRM 2011 Outlook Client not showing all columns in Opportunity Views
Versions: CRM: 2011 On-Premise - 5.0.9688.1533 Outlook: 2010 Professional - 14.0.6122.5000 32bit CRM Client for Outlook: 5.0.9690.1992 Basic Problem The Outlook Client views that show up in Opportunities do not have all the columns that are in the vi
-
How to get drop down list (list of values) in selection-screen
Hi al, This is anilreddy. Please let me knew the solution How to get the drop down list for a fieldin selection-screen (not in dialog programming) (not as POV) Regards, anilreddy
-
User Inputs Not Stored In External File
I'm using the following code to store marks if (courseCode.compareToIgnoreCase(cCodeTerminate) != 0) System.out.print("Enter your exam marks for " + courseCode + ": "); examMarks = Integer.parseInt(in.readLine()); //Loop
-
Missing Template Error Handler
I need to know the shortest, simplest way to handle missing CF template errors on my website. This cannot be set in the Administrator, as my hosting company has told me: "...we cannot do so as all of our customers sites that are accessed wrongly, wil