Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Javascript window.confirm issue
Old 12-19-2008, 06:41 AM Javascript window.confirm issue
Junior Talker

Posts: 1
Trades: 0
Help needed here....I have the following codes.....If the user click "confirm1",then the codes start from "org.tempuri.canceltravelbooking.....until java.lang.string result......"should put after the confirm by the user....May I know how should I put inside the confirm messagebox????

Code:
<%-- start web service invocation --%><hr/>
    <%
    try {
        if(request.getParameter("btnCancel")!=null)
            {%>
            <script type="text/javascript">
             
             var confirm1 = window.confirm("-------------")
              if(confirm1)
                  {

                  }
             </script>

               <%}           
        org.tempuri.CancelTravelBooking service = new org.tempuri.CancelTravelBooking();
    org.tempuri.CancelTravelBookingSoap port = service.getCancelTravelBookingSoap();

    java.lang.String bookingID = c;
    java.lang.String destination = a;
    java.lang.String date = b;
    java.lang.String personAvailable = d;
    // TODO process result here   
    java.lang.String result = port.cancelBooking(bookingID, destination, date,   
       personAvailable);                      
    } catch (Exception ex) 
      {

      }
    %>
    <%-- end web service invocation --%><hr/>
daniel50096230 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-19-2008, 10:08 AM Re: Javascript window.confirm issue
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
I cannot say, but just to signal that you posted an java question under a javascript forum.
My java is rusty, but if there is one thing I know for sure, it's that java and javascript have nothing in common, except a part of their name.

You cannot use java code into a javascript web page section.
You need to expose your java functions via an API to http requests. Via REST, for example.
Then you can use AJAX asynchronous requests from the web page javascript to your API.

I say REST because I don't think that javascript can do xml-rpc, soap or corba calls.
But I am not certain of that.
__________________
Only a biker knows why a dog sticks his head out the window.

Last edited by tripy; 12-19-2008 at 10:10 AM..
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Old 12-20-2008, 06:04 PM Re: Javascript window.confirm issue
Novice Talker

Posts: 12
Trades: 0
like tripy said, You cannot use java code into a javascript on a web page section. It just wont work out.
Armin is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Javascript window.confirm issue
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26766 seconds with 12 queries