Jump to content

[SOLVED] alert message using java


girlzz

Recommended Posts

help me please.. how to make 2 popup menu in one button??? let say if there is a duplicate entry,then click the save button then display popup menu warn that entry already exist.. if not, popup menu again appear for save the entry.. thanks..

Link to comment
Share on other sites

No offense, but look into the basics of JavaScript.

 

 

First off, Java != JavaScript.

 

if(<dup entry>) {

    //blah

}

else {

    //blah

}

 

 

No idea how you're checking for duplicate entries.  Also, you'll want to look into alert(), and maybe confirm().

Link to comment
Share on other sites

like corbin said

 

Java != JavaScript.

 

which means Java is a complete different thing then javascript

 

i suggest you start with opening one popup

<script>
function popup(){
  //open a popup
}
</script>
<button onclick="popup()">open popup</button>

 

the function does nothing yet thats up to you

Link to comment
Share on other sites

erk confuse! still can't understand...  :'(

 

First, like everyone else has said, Java and JavaScript are not the same thing.  Other than their names, the two have nothing in common.  Java is an object oriented programming language whose programs run on a virtual machine.  It was created by Sun Microsystems.  JavaScript is a scripting language which runs in a web browser.  It was created by Netscape.  Continuing to refer to JavaScript as Java will cause people to point and laugh.

 

Second, do you have any idea as to what you're doing.  I mean, we can all write an onclick callback function to open up popup windows, and show you the basic code (like two people have already done), but that's all worthless if you don't actually understand what it is you're looking at.

Link to comment
Share on other sites

hai sir can you explain more detail how to do 2 popup message box in one button?? newbie in java.. thanks

 

 

Well if alert() does 1 popup, what do you think would do 2 popups?

 

2 alert()s!

 

<button value="Hi!" onclick="alert('Hi'); alert('Hi');" />

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.