Howto adres a detail region from another java script or href

I've set up a site with the spry regions and detail regions, loading from an external xml file.
here it is: http://www.mulleners.nl/nieuw/projecten.html
when you switch between "deventer" and "arnhem" you see the image switching, and also the amount of points on the bottom of the page. These points should show some more images of the same project. Now only the first picture is shown.
At the moment this is the image source img src="images/{nr}/1.jpg".
The {nr} is the project number, which has its corresponding folder.In this folder there are a couple of pictures (1.jpg, 2.jpg, ...etc)
So what i'm trying to do is replacing the "1" by a variable which I can adres with a java script.
Any help/suggestion on how to solve this? Or comments on the general approach?
thanks,
sven

I've set up a site with the spry regions and detail regions, loading from an external xml file.
here it is: http://www.mulleners.nl/nieuw/projecten.html
when you switch between "deventer" and "arnhem" you see the image switching, and also the amount of points on the bottom of the page. These points should show some more images of the same project. Now only the first picture is shown.
At the moment this is the image source img src="images/{nr}/1.jpg".
The {nr} is the project number, which has its corresponding folder.In this folder there are a couple of pictures (1.jpg, 2.jpg, ...etc)
So what i'm trying to do is replacing the "1" by a variable which I can adres with a java script.
Any help/suggestion on how to solve this? Or comments on the general approach?
thanks,
sven

Similar Messages

  • How to call a Java class from another java class ??

    Hi ..... can somebody plz tell me
    How to call a Java Class from another Java Class assuming both in the same Package??
    I want to call the entire Java Class  (not any specific method only........I want all the functionalities of that class)
    Please provide me some slotuions!!
    Waiting for some fast replies!!
    Regards
    Smita Mohanty

    Hi Smita,
    you just need to create an object of that class,thats it. Then you will be able to execute each and every method.
    e.g.
    you have developed A.java and B.java, both are in same package.
    in implementaion of B.java
    class B
                A obj = new A();
                 //to access A's methods
                 A.method();
                // to access A's variable
                //either
               A.variable= value.
               //or
               A.setvariable() or A.getvariable()

  • Trying to compile a .java file from another .java file

    Hello,
    I'm trying to compile a .java file from another .java file using Runtime.exec...
    String c[]=new String[3];
    c[0]="cmd.exe"; c[1]="/c" ; c[2]="javac Hello.java";
    Process p=Runtime.exec(c);
    If anyone can help me in atleast getting the command prompt when Runtime.exec("cmd.exe") is executed...that would be great...I tried out notepad.exe, calc, explorer instead of cmd.exe...all the commands display their respective windows..except cmd.exe...the command prompt doesnt appear...
    Please help me ASAP....
    Thanks for your help in advance...
    Regards.
    AKhila.

    try this. ur code will be compliled and will get .class file. but console won't appear. is it a must for u?
    public class Exec{
         public static void main(String a[]) throws Exception{
              String c[]=new String[3];
              c[0]="cmd.exe"; c[1]="/c" ; c[2]="javac Hello.java";
              Process p=Runtime.getRuntime().exec(c);
              // or Runtime.getRuntime().exec("javac Hello.java");

  • How do I pass parameter to different portlet regions from another page?

    How do I pass parameter to different portlet regions from
    another page?
    I have a page that with two regions. Each region has a report
    that uses the same information to generate its report.
    Individually running the reports, I can use p_arg_names and
    p_arg_values to get what I want. However, when I run the page
    that has both portlets, my .show is gone and I cannot get it to
    use the p_arg_names, etc. Do you have any idea how to overcome
    this? Thanks for any help.

    How do I pass parameter to different portlet regions from
    another page?
    I have a page that with two regions. Each region has a report
    that uses the same information to generate its report.
    Individually running the reports, I can use p_arg_names and
    p_arg_values to get what I want. However, when I run the page
    that has both portlets, my .show is gone and I cannot get it to
    use the p_arg_names, etc. Do you have any idea how to overcome
    this? Thanks for any help.

  • Starting New process (continous) from another java process

    Hi,
    I am running into a trouble in starting a new java process (continous process it is like daemon process ) from another java process.
    Eg;
    Caller.java runs on one JVM instance, from this Caller.java i need to start a daemon java process ConnectionManager.java (My caller.java should have to know whether ConnectionManager was successfully started as a seperate java process or not)
    Also Caller.java has to stop ConnectionManager.java(which is running as seperate process)
    Any help would be appeciated.
    Thank you very much.

    First of all the design is unusual. Your issue is basically intercommunication between two processes written in java. There are various ways to do that:
    1. Use Persistent system(File/Database) : Easiest but have external dependency.
    2. Use RPC calls both JVM,s little bit complex.
    3. Run new JVM in debug mode and connect on bootstrap port.
    4. Communicate using Sockets.
    Whatever suits you...

  • How to compile and run a .java file from another java program

    hello,
    can any one tell me how to compile and run a *.java* file from another java program which is not in same directory?

    Well a smarter way of implementing this is by using a solution provided by Java Itself.
    If you are using J2SE 6.0+ there is an in built solution provided along with JDK itself and inorder to go ahead with solution the below are set of API which you;d be using it for compiling Java Programs (Files)
    http://java.sun.com/javase/6/docs/api/javax/tools/package-summary.html
    How do i do that ??
    Check out the below articles which would help you of how to do that
    http://www.ibm.com/developerworks/java/library/j-jcomp/index.html
    http://www.javabeat.net/javabeat/java6/articles/java_6_0_compiler_api_1.php
    http://books.google.com/books?id=WVbpv8SQpkEC&pg=PA155&lpg=PA155&dq=%22javax+tools%22+compiling+java+file&source=web&ots=XOt0siYe-f&sig=HH27ovuwvJgklIf8omTykUmy-eM
    Now once we are done with compilation.In order to run a Specific class all you ought to do is create an object and its specific methods of a specified class included in the CLASSPATH which you can manage it easily by usage little bit reflections.
    Hope that might help :)
    REGARDS,
    RaHuL

  • Please help with executing a java program from another java program

    Hi, I have tried to execute a very simple java program which is printed out "Hello world" from another java gui program when the user click on the "START" button. However, I don't receive any print out on the terminal when they click it. These two programs are being developed in Unix environment. Here is the code that I am trying to use.
    Runtime r = Runtime.getRuntime();
    r.exec("java HelloWorld");
    p.s. HelloWorld is java class of the HelloWorld.java

    I think you have to luanch your MS Prompt first before executing the command.

  • Is it possible to call a method in a servlet from  a java script ?

    I need to do a dynamic html page . In the page i select some things and then these things must communicate whit a servlet because the servlet will do some DB querys and update the same webpage.
    So is it possible to actually call a method of a servlet from a java script? i want to do something that looks like this page:
    http://www.hebdo.net/v5/search/search.asp?rubno=4000&cregion=1011&sid=69DHOTQ30307151
    So when u select something in the first list the secodn list automaticly updates.
    thank you very much

    You can
    1. load all the options when loading the page and
    set second selection options when user selected
    the first; or
    2. reload the page when user select first selection
    by 'onChange' event; or
    3. using iframe so you only need to reload part of
    the page.

  • How to call a Java Web Service from another Java package ?

    Please, does anybody know a simple way to access to a JWSDP Web Service deployed under Tomcat with another java application ?
    I've tried with ServiceFactory and Service class from JaxRPC API but it doesn't work ....
    Thanx.

    What not just invoke it the same you would invoke a remote service? Create a service stub and call a service method.
    Mike

  • How to call inner class method in one java file from another java file?

    hello guyz, i m tryin to access an inner class method defined in one class from another class... i m posting the code too wit error. plz help me out.
    // test1.java
    public class test1
         public test1()
              test t = new test();
         public class test
              test()
              public int geti()
                   int i=10;
                   return i;
    // test2.java
    class test2
         public static void main(String[] args)
              test1 t1 = new test1();
              System.out.println(t1.t.i);
    i m getting error as
    test2.java:7: cannot resolve symbol
    symbol : variable t
    location: class test1
              System.out.println(t1.t.geti());
    ^

    There are various ways to define and use nested classes. Here is a common pattern. The inner class is private but implements an interface visible to the client. The enclosing class provides a factory method to create instances of the inner class.
    interface I {
        void method();
    class Outer {
        private String name;
        public Outer(String name) {
            this.name = name;
        public I createInner() {
            return new Inner();
        private class Inner implements I {
            public void method() {
                System.out.format("Enclosing object's name is %s%n", name);
    public class Demo {
        public static void main(String[] args) {
            Outer outer = new Outer("Otto");
            I junior = outer.createInner();
            junior.method();
    }

  • Launching a java application from another java application

    Hi,
    I'm facing an interesting challenge :-)
    Inside a Java application, I want to start another java application.
    Possible solutions in my list :
    1. Using jakarta commons launcher.
    2. Runtime.exec (make the code platform dependent).
    3. Starting the main method of the other app by create a new Thread inside the current app
    4. I know people did this by calling an ant target from the java application but I don't have
    any sample code, I appreciate any sample code for it.
    Thanks,
    Ali Salehi

    That is an iteresting challenge :)Don't be mean; he's polite, done some investigation and taken the trouble to be clear. The question, presumably, is "has anyone got a different solution or a preference as to which of these is the best?"
    In which case, my advice would be to say that invoking main in a separate thread is fundamentally different from Runtime.exec() because the former would run in the same JVM. Is this what you want? If one app has the other on its classpath then do they need to be separate apps? Could they be modules of a single app?

  • Trouble in Unix calling a Java utility from another shell script

    Hi,
    I'm able to run a shell script (call it script B) in Unix which calls a Java utility. When I call script B from another script (script A) I get the error below. I have done much work to make sure the environment variables are the same.
    java.util.zip.ZipException: error in opening zip f
    ile
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:69)
    at com.something.runtime.ZipFileApplicationSource.<init>(ZipFileApplicationSource.java:22)
    at com.something.runtime.ZipFileRuntime.main(ZipFileRuntime.java:35
    ANY HELP WOULD BE GREATLY APPRECIATED.
    Thanks

    Here's my guess, if this doesn't work, post your scripts and maybe that will help.
    When you run your script B, you said it works. I think the problem is that when you run script B, your shell and envirenment variables are set by the window you're working in. When you call script B from script A, it creates a new shell to run it and it doesn't run the files that are run when you start a terminal or a telnet(it won't run .cshrc, .kshrc or .login). Depending on what OS you're using, I think the default shell is sh for most of them. The first line of script B should be
    #!/(your bin directory)/(shell you're using)
    for me it's
    #!/bin/tcsh
    then you might want to run your startup file to set envirenment variables, paths, etc...
    source (your user directory)/(the file name)
    for me it's
    source ~/.cshrc
    Then if you need to set the environment variables in your script.
    set CLASSPATH /usr/local/j2ee/bin.....
    set PATH /bin:/xyz....
    If that doesn't help post your scripts, or if I didn't explain it will enough, just ask.

  • Killing a Java process from another Java process

    Hi
    Is there a possible way of sending a SIGINT, SIGKILL, or any other signal from a Java process running in one JVM, to a java process running in a different JVM on the same machine.
    I've the signal handlers written in my process and they do respond to singals (e.g. on pressing Ctrl-C) on the console, but i want to write a separate program that sends this signal to the first process.
    Any ideas?
    Thanks in advance and regards
    Kashif

    The answer, as always, is that Java can't do operating-system-specific things like that, but you can use JNI to do it. However, if your code created the Java process you want to kill, via Process p = Runtime.getRuntime().exec(...), then you can use p.destroy() to kill it.

  • How to populate a table in the html page from the java script

    Hi all,
    I have doubt in populating a table in the html page. my application is as follows
    I have a html page in which i have a combo box and a table following the combo box.
    i have to populate the table depending on the item selected in the combo box.
    for this i am using javascript to get the value of combo box onClick
    then i have to call some function thru jsp to get the data and then i have to populate the table with thst into from java script
    how can i do this, i.e populating html table from java script
    Thanks in advance
    satya

    Hi Mihai,
    You can populate data in DO_INIT_CONTEXT method of ur impl class in your Z component.
    data:
    lv_struct_ref type ref to YOUR_STRUCTURE,
    lv_value_node type ref to cl_bsp_wd_value_node,
    lv_bo_coll type ref to if_bol_bo_col.
    Data: current type ref to if_bol_bo_property_access.
    data: dref type ref to data.
    data: lv_guid_h type crmt_object_guid.
    data: lt_attr type table of YOUR_STRUCTURE.
    data: ls_attr type YOUR_STRUCTURE.
    data: lr_entity type ref to cl_crm_bol_entity.
    create object lv_bo_coll type cl_crm_bol_bo_col.
    lt_attr is ur internal table.
    Loop at lt_attr into ls_attr.
      create data lv_struct_ref.
      create object lv_value_node
           exporting
                iv_data_ref = lv_struct_ref.
    call method lv_value_node->if_bol_bo_property_access~set_property
    exporting
    iv_attr_name = 'YOURFIELDNAME1'
    iv_value = ls_attr-firstname.
    call method lv_value_node->if_bol_bo_property_access~set_property
    exporting
    iv_attr_name = ' YOURFIELDNAME2'
    iv_value = ls_attr-lastname.
    lv_bo_coll->add( lv_value_node ).
    typed_context->YOURCONTEXTNODE->set_collection( lv_bo_coll ).
    endloop.
    Regards,
    Raghu

  • Fishing data from a java script

    Hi all,
    there is an internet site which runs a java script to collect data and print them on the screen in a table. To be more precise, there is a button on that site; when the mouse goes upon that button the status bar writes something like "javascript: ..."; and when I click on that button the script is launched and after a few seconds a table with (many) data appears.
    However, it is not possible to copy or export that table of data (and this is precisely what I want to do!). I can only visualize them.
    So my question is: how can I access to these data (in ASCII format)? My underlying idea is that they must be stored somewhere on my computer, or that there is a way to spy on the javascript and fish the data...
    Thanks for helping me!
    Bruno

    If the data can't be copied, you might not have the legal rights to do so, anyway.
    How about opening the source of the site when your browser shows it? Or copying using CTRL+C instead of the mouse? If Javascript disallows both, turn it off.

Maybe you are looking for